我正在嘗試使用Bootstrap水平列表,但它無法正常工作。我該如何解決這個問題?水平列表不起作用
這裏是我的代碼:
.btn-xs, .btn-group-xs > .btn {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
width: 73px;
height: 38px;
background-color: #53585f;
color: white;
font-family: sans-serif;
}
.btn-default:hover {
background-color: #b89981;
color: white;
}
ul.list-group:after {
clear: both;
display: block;
content: "";
}
.list-group-item {
float: left;
}
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid #ddd;
width: 73px;
}
.padding20 {
padding : 10px;
}
.textbox {
line-height: 24px;
}
.liststyle1 {
margin: 0;
list-style: none;
margin-top: 10px;
line-height: 28px;
color: #309be8;}
<div class="container">
<h2>dsd</h2>
<button type="button" class="btn btn-default btn-xs">Total</button>
<button type="button" class="btn btn-default btn-xs">Check-Out</button>
<button type="button" class="btn btn-default btn-xs">Check-In</button>
<button type="button" class="btn btn-default btn-xs">Alerts</button>
<button type="button" class="btn btn-default btn-xs">Tentative</button>
</div>
<div class="container list-top">
<ul class="list-group">
<li class="list-group-item">12Bookings
</li>
<li class="list-group-item">Dapibus </li>
<li class="list-group-item">Morbi</li>
<li class="list-group-item">Porta</li>
<li class="list-group-item">Vestib</li>
</ul>
</div>
你爲什麼不使用按鈕列表項裏面? – tilz0R
你如何設置它? – Jhone
這看起來像是表格元素的作業,而不是列表。 –