使html中div内的图片随屏幕大小调节的操作方法为,将div与img的宽度都设置为100%,代码如下:
<
html
>
<head>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
/>
<
title
>图片大小自适应</
title
>
<
style
type
=
"text/css"
>
div,img{ width:100%;}
</
style
>
</
head
>
<
body
>
<