我想制作一个 div,其中多个 div 位于主 div 的底部,并且我添加的所有 div 水平显示
例子
------------------------
| |
| Main Div |
| |
| |
|-----|-----| |
| div | div | |
|----------------------|
我已经有了这段代码,但它没有在底部显示子 div
<style>
.spectrumcontainer{
width: 1000px;
height: 400px;
border: solid 1px black;
/*margin-top: 0px;
margin-left: 0px;*/
/*padding: 0px;
/*text-align: left;
vertical-align: bottom;*/
position: relative;
/*float: none;*/
overflow: auto;
white-space: nowrap;
}
.redbar{
width: 35px;
height: 15px;
background: #ff0000; /* Old browsers */
background: -moz-linear-gradient(left, #ff0000 0%, #ff0000 50%, #e50000 51%, #aa0000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#ff0000), color-stop(50%,#ff0000), color-stop(51%,#e50000), color-stop(100%,#aa0000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #ff0000 0%,#ff0000 50%,#e50000 51%,#aa0000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #ff0000 0%,#ff0000 50%,#e50000 51%,#aa0000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #ff0000 0%,#ff0000 50%,#e50000 51%,#aa0000 100%); /* IE10+ */
bottom: 0;
left: 0;
/*position: absolute;*/
float: left;
display: inline-block;
}
.orangebar{
width: 35px;
height: 15px;
background: #ff7f00; /* Old browsers */
background: -moz-linear-gradient(left, #ff7f00 0%, #fc8600 50%, #e26200 51%, #bf5c00 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#ff7f00), color-stop(50%,#fc8600), color-stop(51%,#e26200), color-stop(100%,#bf5c00)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #ff7f00 0%,#fc8600 50%,#e26200 51%,#bf5c00 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #ff7f00 0%,#fc8600 50%,#e26200 51%,#bf5c00 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #ff7f00 0%,#fc8600 50%,#e26200 51%,#bf5c00 100%); /* IE10+ */
bottom: 0;
left:0;
/*position: absolute;*/
float: left;
display: inline-block;
}
</style>
<div class="spectrumcontainer">
<div class="redbar"></div>
<div class="orangebar"></div>
</div>
但它不能正常工作。
这是现场示例