내가 추가 모든 div의 가로여러 div의 수평 컨테이너 사업부에
예
보여 이미------------------------
| |
| Main Div |
| |
| |
|-----|-----| |
| div | div | |
|----------------------|
I 이 코드가 있지만 하단에 하위 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>
그러나 제대로 작동하지 않습니다.
다음은 고정 높이가 된 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