- Button Group လုပ်နည်း
CSS ဖြင့် "ခလုတ်အဖွဲ့" ကို ဖန်တီးနည်းကို လေ့လာပါ။
အလျားလိုက်ခလုတ်အုပ်စုများ
ခလုတ်အုပ်စုတစ်ခုတွင် စာကြောင်းတစ်ခုတည်းတွင် ခလုတ်အတွဲလိုက်အုပ်စုဖွဲ့ပါ-
ခလုတ်အုပ်စုဖွဲ့နည်း
အဆင့် 1) HTML ကိုထည့်ပါ
ဥပမာ
<div class="btn-group">
<button>Apple</button>
<button>Samsung</button>
<button>Sony</button>
</div>
အဆင့် 2) CSS ကိုထည့်ပါ
ဥပမာ
.btn-group button {
background-color: #04AA6D; /* Green
background */
border: 1px solid green; /* Green border
*/
color: white; /* White text */
padding: 10px
24px; /* Some padding */
cursor: pointer; /*
Pointer/hand icon */
float: left; /* Float the
buttons side by side */
}
.btn-group button:not(:last-child) {
border-right: none; /* Prevent double borders */
}
/* Clear floats (clearfix hack) */
.btn-group:after {
content: "";
clear: both;
display:
table;
}
/* Add a background color on hover */
.btn-group button:hover {
background-color: #3e8e41;
}
မျှတသော/ အကျယ်အဝန်း ခလုတ်အုပ်စု-
ဥပမာ
<!-- Three buttons in a group -->
<div class="btn-group" style="width:100%">
<button
style="width:33.3%">Apple</button>
<button style="width:33.3%">Samsung</button>
<button
style="width:33.3%">Sony</button>
</div>
<!--
Four buttons in a group -->
<div class="btn-group" style="width:100%">
<button
style="width:25%">Apple</button>
<button style="width:25%">Samsung</button>
<button
style="width:25%">Sony</button>
<button
style="width:25%">HTC</button>
</div>
အကြံပြုချက်- ခလုတ်များကို စတိုင်လ်ပုံစံလုပ်ပုံအကြောင်း ပိုမိုလေ့လာရန် ကျွန်ုပ်တို့၏ CSS Buttons Tutorial သို့ သွား ပါ။