我有标记:
我需要制作.step
100% 的父容器,如何做到这一点。html:
<div class="steps-container">
<div class="group">
<div class="step">
<ul class="sortable">
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
</ul>
</div>
<div class="step">
<ul class="sortable">
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
<li class="item">Item</li>
</ul>
</div>
<div class="step">
<ul class="sortable">
<li class="item">Item</li>
<li class="item">Item</li>
</ul>
</div>
</div>
</div>
CSS:
* {
margin: 0px;
padding: 0px;
}
ul {
list-style-type: none;
margin: 0px;
padding: 0px;
display: inline-block;
}
.sortable li {
margin: 0px;
padding: 0px;
width: 100px;
height: 100px;
border: 1px solid black;
background-color: lightgrey;
}
.group {
display:inline-block;
border: 1px solid red;
}
.step {
border: 1px solid green;
display:inline-block;
background-color: yellow;
}
.item {
background-color: lightgray;
}