課程
/前端開發
/Bootstrap
/玩轉Bootstrap(基礎)
為什么給label和input設置浮動后沒有在一行
2017-03-23
源自:玩轉Bootstrap(基礎) 3-1
正在回答
這不就坐在一行了嗎
在<div class="form-group">中加入這個就可以在一行了
<ul class="list-unstyled list-inline">
? ? ? ? <li>
? ? ? ? ? ? <label for="exampleInputEmail1">郵箱:</label>
? ? ? ? ? ? </li>
? ? ? ? ? ? <input type="email" class="form-control" id="exampleInputEmail1" placeholder="請輸入您的郵箱地址">
? ? ? ? </ul>
</div>
將input的寬度設短點,
.form-control?{
? ?display:?block;
? ?width:?100%;
}
這個長度100%,label和input在不了一行
舉報
告訴你使用Bootstrap,并且能夠獨立定制出適合自己的Bootstrap
1 回答為什么代碼寫的一樣不能在同一行顯示呢?
1 回答為什么我無法顯示
1 回答為什么不顯示文字
1 回答第一段代碼中教程后為什么沒有顯示三角號?
3 回答怎么使列表一行 顯示多列?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-08-10
2017-08-10
在<div class="form-group">中加入這個就可以在一行了
<ul class="list-unstyled list-inline">
? ? ? ? <li>
? ? ? ? ? ? <label for="exampleInputEmail1">郵箱:</label>
? ? ? ? ? ? </li>
? ? ? ? <li>
? ? ? ? ? ? <input type="email" class="form-control" id="exampleInputEmail1" placeholder="請輸入您的郵箱地址">
? ? ? ? ? ? </li>
? ? ? ? </ul>
</div>
2017-03-23
將input的寬度設短點,
.form-control?{
? ?display:?block;
? ?width:?100%;
}
這個長度100%,label和input在不了一行