လုပ်နည်း - Search Bar
တုံ့ပြန်မှုရှိသော လမ်းညွှန်ချက်မီနူးအတွင်း ရှာဖွေရေးအကွက်ကို ထည့်သွင်းနည်းကို လေ့လာပါ။
Search Bar
ရှာဖွေမှုဘားတစ်ခုဖန်တီးပါ။
အဆင့် 1) HTML ကိုထည့်ပါ
ဥပမာ
<div class="topnav">
<a class="active" href="#home">Home</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
<input type="text" placeholder="Search..">
</div>
အဆင့် 2) CSS ကိုထည့်ပါ
ဥပမာ
/* Add a black background color to the top navigation bar */
.topnav {
overflow: hidden;
background-color: #e9e9e9;
}
/* Style the links inside the navigation
bar */
.topnav
a {
float: left;
display: block;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
/* Change the color of links on hover */
.topnav a:hover {
background-color: #ddd;
color: black;
}
/* Style the "active" element to highlight the current page */
.topnav a.active {
background-color: #2196F3;
color: white;
}
/* Style the search box inside the navigation bar */
.topnav input[type=text] {
float: right;
padding: 6px;
border: none;
margin-top: 8px;
margin-right: 16px;
font-size: 17px;
}
/*
When the screen is less than 600px wide, stack the links and the search field
vertically instead of horizontally */
@media screen and (max-width: 600px) {
.topnav a, .topnav input[type=text] {
float: none;
display: block;
text-align: left;
width: 100%;
margin: 0;
padding: 14px;
}
.topnav input[type=text] {
border: 1px
solid #ccc;
}
}
Submit Button ဖြင့် ဥပမာ
Submit Icon ဖြင့် ဥပမာ
အကြံပြုချက်- မိုဘိုင်းအတွက် အဆင်ပြေပြီး တုံ့ပြန်မှုရှိသော လမ်းကြောင်းပြဘားများကို ဖန်တီးရန်၊ ကျွန်ုပ်တို့၏ တုံ့ပြန်မှု ထိပ်တန်း လမ်းကြောင်းပြနည်း သင်ခန်းစာကို ဖတ်ရှုပါ။
အကြံပြုချက်- လမ်းပြဘားများအကြောင်း ပိုမိုလေ့လာရန် ကျွန်ုပ်တို့၏ CSS Navbar Tutorial သို့ သွားပါ ။