16 回答
TA貢獻22條經驗 獲得超15個贊
<img src="images/diyiye1.jpg" width="1920" height="932">
這句代碼明顯是給圖片設置了固定的寬度和高度啊~~ 如果需要根據屏幕大小調整圖片大小,圖片的寬高設置百分比吧~~
TA貢獻15條經驗 獲得超5個贊
圖片可以套一個Div標簽,定義Div的寬度為100%;
<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title></title>
</head>
<style?type="text/css">
#div_img?img{
width:?100%;
}
</style>
<body>
<div?id="div_img">
<img?src="../browser/images/chrome-big.jpg"?/>
</div>
</body>
</html>TA貢獻2條經驗 獲得超0個贊
HTML?
<div class="section" ><img src="images/diyiye1.jpg" width="1920" height="932"></div>
?CSS?
.fp-section { position: relative; -webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */?
-moz-box-sizing: border-box; /* <=28 */
?box-sizing: border-box; }
?.fp-section img { text-align:center;}?
.fp-section.fp-table, .fp-slide.fp-table { display: table; width: 100%; }
麻煩幫忙看下,謝謝
TA貢獻2條經驗 獲得超0個贊
HTML?
<div class="section" ><img src="images/diyiye1.jpg" width="1920" height="932"></div>
?CSS?
.fp-section { position: relative; -webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */ -moz-box-sizing: border-box; /* <=28 */ box-sizing: border-box; } .fp-section img { text-align:center;} .fp-section.fp-table, .fp-slide.fp-table { display: table; width: 100%; 麻煩幫忙看下,謝謝
- 16 回答
- 2 關注
- 8195 瀏覽
添加回答
舉報
