လုပ်နည်း - Equal Width Navbar Links များ
အနံညီသော လမ်းကြောင်းပြလင့်ခ်များဖြင့် လမ်းကြောင်းပြဘားတစ်ခု ဖန်တီးနည်းကို လေ့လာပါ။
ညီမျှသော အကျယ် မီနူး
Responsive Navigation Bar တစ်ခု ဖန်တီးပါ။
အဆင့် 1) HTML ကိုထည့်ပါ
ဥပမာ
<!-- The navigation menu -->
<div class="navbar">
<a class="active" href="#">Home</a>
<a href="#">Search</a>
<a href="#">Contact</a>
<a href="#">Login</a>
</div>
အဆင့် 2) CSS ကိုထည့်ပါ
ဥပမာ
/* Style the navigation menu */
.navbar {
width: 100%;
background-color: #555;
overflow: auto;
}
/* Navigation links */
.navbar a {
float: left;
padding: 12px;
color: white;
text-decoration: none;
font-size: 17px;
width: 25%; /* Four equal-width links. If you have two links, use 50%, and
33.33% for three links, etc.. */
text-align: center; /* If you want
the text to be centered */
}
/* Add a background color on mouse-over
*/
.navbar a:hover {
background-color: #000;
}
/* Style the current/active link */
.navbar a.active {
background-color: #04AA6D;
}
/* Add
responsiveness - on screens less than 500px, make the navigation links appear
on top of each other, instead of next to each other */
@media screen and
(max-width: 500px) {
.navbar a {
float: none;
display: block;
width: 100%;
text-align: left; /* If you want the text to be left-aligned on small screens
*/
}
}
အိုင်ကွန်များဖြင့် တူညီသော အကျယ်အဝန်း လမ်းကြောင်းပြလင့်ခ်များ
ဥပမာ
အကြံပြုချက်- လမ်းပြဘားများအကြောင်း ပိုမိုလေ့လာရန် ကျွန်ုပ်တို့၏ CSS Navbar Tutorial သို့ သွားပါ ။