Vertikal tugmalar guruhi
CSS yordamida vertikal "tugmalar guruhi"ni yaratishni o‘rganing.
Vertikal tugmalar guruhi
Bir nechta tugmani vertikal tugmalar guruhiga birlashtiring:
Vertikal tugmalar guruhi qanday yaratiladi
1-qadam) HTML qo‘shing:
Misol
<div class="btn-group">
<button>Apple</button>
<button>Samsung</button>
<button>Sony</button>
</div>
2-qadam) CSS qo‘shing:
Misol
.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 */
width: 50%; /* Set a width if needed */
display: block; /* Make the buttons appear below each other */
}
.btn-group button:not(:last-child) {
border-bottom: none; /* Prevent double borders */
}
/* Add a background color on hover */
.btn-group button:hover {
background-color: #3e8e41;
}
O‘zingiz sinab ko‘ring »
Maslahat: Tugmalarga qanday uslub berish haqida ko‘proq bilish uchun CSS tugmalar darsligimizga o‘ting.
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
