页面会自适应手机屏幕大小,在里面的图片不能

WBOY
Release: 2016-06-13 11:52:51
Original
1393 people have browsed it

页面能自适应手机屏幕大小,在里面的图片不能

本帖最后由 wealsh 于 2014-03-27 17:53:53 编辑

html 已经加了


内容是从数据库里读取的,整个页面及文本都可以自适应,但里面的图片就不会自适应大小,请问如何处理?
------解决方案--------------------
设置图片的百分比宽度
------解决方案--------------------
用js去改变可以
------解决方案--------------------
加个样式便可自适应。
<br />  <style type="text/css"><br />   .img{text-align:center;}<br />   .img img{width:90%;}<br />  </style><br />  <p class="img"><img  src="test.jpg" alt="页面会自适应手机屏幕大小,在里面的图片不能" ></p><br />
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!