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 关注
- 7796 浏览
添加回答
举报