လုပ်နည်း - Search Button
CSS ဖြင့် ရှာဖွေရေးခလုတ်ကို ဖန်တီးနည်းကို လေ့လာပါ။
အကျယ်-
အနံအများဆုံးရှိသော ဖောင်တစ်ခုအတွင်း ဗဟိုပြုသည်-
Search Button တစ်ခုဖန်တီးနည်း
အဆင့် 1) HTML ကိုထည့်ပါ
ဥပမာ
<!-- Load icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- The form -->
<form class="example" action="action_page.php">
<input type="text" placeholder="Search.." name="search">
<button
type="submit"><i class="fa fa-search"></i></button>
</form>
အဆင့် 2) CSS ကိုထည့်ပါ
ဥပမာ
* {
box-sizing: border-box;
}
/* Style the search field */
form.example input[type=text] {
padding: 10px;
font-size: 17px;
border: 1px solid grey;
float: left;
width: 80%;
background: #f1f1f1;
}
/* Style the submit button */
form.example button {
float: left;
width: 20%;
padding: 10px;
background: #2196F3;
color: white;
font-size: 17px;
border: 1px solid grey;
border-left: none; /* Prevent double borders
*/
cursor: pointer;
}
form.example
button:hover {
background: #0b7dda;
}
/* Clear floats */
form.example::after {
content: "";
clear: both;
display: table;
}