建站知识搜索
|
解决H5网页在手机浏览器下图标或者背景图片模糊的问题6697次浏览 |
2016-09-09 |
|
<div style="background:#e5e5e5;height:98px;width:100%;"> //外层 <div style="background:url(/templates/yungou/mobile/images/kf.jpg) center center no-repeat;background-size:200px auto;height:98px;width:200px;margin:0 auto;"></div> //内层,图标或者图片 </div>
解决思路就是用两层来控制显示,内层将宽度设置为你想在手机上显示的宽度。然后关键点在background-size:200px auto;高度为等比例 页面所在本站地址: http://www.52-life.net/Nshow_reurl.asp?reurl=h5_pic_mohu |
上一篇 >>如何将google地图从中文转变为英文 |
下一篇 >>HTML5 获取用户经纬度及距离计算公式 |
|
|
|