我想和位于主div的底部多个div一个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>
但它不能正常工作。
这里是活生生的例子
http://jsfiddle.net/kelelehead/KQwnp/
喜欢这个http://jsfiddle.net/j08691/KQwnp/2/? – j08691
这是'display'-和'vert.align'-ed http://jsfiddle.net/KQwnp/6/ –
这个想法是制作一个音乐频谱,当我按下这个div时,它会增长(高度)到UP ,所以如果我使用它就像你的例子设置TOP:385当我点击它的增长下来吧,而不是像这样http://jsfiddle.net/kelelehead/TKKmA/ – kelelehead