我已經使用自定義框架進行響應。 在移動視圖中,小於(768px分辨率)的文本框正在打破我的容器。它放在容器的外面,不考慮容器填充。移動視圖中打破容器的文本框
這裏是我的html:
<div class="container">
<div class="col-3">
<input type="text" />
</div>
<div class="col-3">
<input type="text" />
</div>
<div class="col-3">
<input type="text" />
</div>
</div>
這裏是CSS:
* { margin:0px; padding:0px; }
.container { width:1170px; margin:0px auto; }
.col-3 { float:left; width:30%; margin-right:3%; background:#CCC; }
input { border:0px none; background:#333; height:30px; line-height:30px; width:100%; color:#FFF; padding:0px 10px; }
@media (max-width:767px)
{
.container { width:auto; padding:0px 10px; }
.col-3 { float:none; width:100%; margin-bottom:10px }
}
感謝您的幫助,但是,這個屬性是不是在IE工作。你有沒有其他的解決方案,請讓我知道 – Husen
'box-sizing:border-box'從IE8開始工作。你使用什麼版本? – Turnip