課程
/前端開發
/Bootstrap
/基于bootstrap的網頁開發
carousel的圖片不隨背景變小,圖片還是那么大
2017-03-12
源自:基于bootstrap的網頁開發 3-5
正在回答
.carousel {
? ? ? ? ? ? ? ? height: 300px;
? ? ? ? ? ? ? ? margin-bottom: 30px;
? ? ? ? ? ? }
? ? ? ? ? ? .carousel .item {
? ? ? ? ? ? .carousel img {
? ? ? ? ? ? ? ? min-height: 300px;
????????????????width:100%;
這些css你設置了嗎?
?? .carousel img { width:100%; },這樣就行,不要去設定它的最少高度,這樣就可以按比例縮放
舉報
Bootstrap框架的基礎教程,學會用Bootstrap前端框架搭建網頁
5 回答bootstrap背景圖片
1 回答縮小圖片和背景黑色跑偏了
4 回答圖片溢出carousel高度
2 回答瀏覽器縮小了。背景色就在圖片下方,height就比圖片長了
1 回答為什么窗口縮小,輪播和圖片都變小了,字體不變小!
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-03-15
.carousel {
? ? ? ? ? ? ? ? height: 300px;
? ? ? ? ? ? ? ? margin-bottom: 30px;
? ? ? ? ? ? }
? ? ? ? ? ? .carousel .item {
? ? ? ? ? ? ? ? height: 300px;
? ? ? ? ? ? }
? ? ? ? ? ? .carousel img {
? ? ? ? ? ? ? ? min-height: 300px;
????????????????width:100%;
? ? ? ? ? ? }
這些css你設置了嗎?
2017-03-15
?? .carousel img { width:100%; },這樣就行,不要去設定它的最少高度,這樣就可以按比例縮放