그래서이 다소 이상한 문제가 있습니다. 일부 divs
을 나열하려고하는데이 이상한 문제가 생겼습니다. 내가 div 안에 <input type="checkbox" />
을 넣고 다른 div와 같은 줄에 줄을 그다지 시도하지 않는다면 어떻게 되겠습니까?하지만 두 번째 div에 텍스트를 추가하면 갑자기 왜 시작됩니까? 그게 일어난거야? 당신이 display: inline-block
를 사용할 때마다 항상도 (당신이 원하는에 따라 또는 bottom
) vertical-align: top
를 지정하는 것이 좋습니다 http://jsfiddle.net/wxgVw/2/간단한 html divs 라이닝 "bug"
<div id="container">
<div id="container2">
<div id="left">
<input type="checkbox" />
</div>
<div id="right">
</div>
</div>
</div>
body{
margin:50px;
}
#container{
width:770px;
height:400px;
border:1px solid red;
}
#container2{
width:700px;
height:50px;
margin:10px;
outline:1px solid red;
padding:10px;
}
#left{
width:30px;
height:30px;
outline:1px solid green;
display:inline-block;
zoom:1;
*display:inline;
}
#right{
width:400px;
height:30px;
outline:1px solid black;
display:inline-block;
zoom:1;
*display:inline;
}
귀하의 질문에 코드의 사본을 넣어 :
나는 샘플을 편집했다. 누구든지 언제든지 바이올린을 바꿀 수 있습니다. 미래의 존재는 보장되지 않습니다. –@RobertHarvey "실행"버튼은 변경된 결과 탭을 업데이트하고 "업데이트"버튼은 새 버전에서 분기됩니다 (따라서 URL의'/ 2 /','/ 3 /'등등)) ... –
@Kolink : 좋습니다. 하지만 여기에 코드를 게시 할 수 있습니다. 우리는 외부 소스에 대한 링크에만 의존해서는 안됩니다. –