部分手机浏览器图片不显示问题

编程入门 行业动态 更新时间:2024-10-24 14:19:49

今天做手机项目中,一个轮播图片,在其他手机浏览器没问题,但是到了UC浏览器就有问题了,经过站长逐步排查,发现UC浏览器自带了广告过滤,

在UC浏览器设置里面将广告过滤关闭即可,但是这不是唯一解决方案。

后来我发现,uc手机浏览器会过滤包含ad字符的图片路径,禁止其显示,所以给图片命名或存放图片路径时 尽量不要含有ad字符。如ad_img

所以站长代码原来是这样的:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 < section  class = "ads"  style = "top: -860px;" >      < div  class = "ad_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/ad1.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "ad_2"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/ad2.jpg"  style = "width: 320px; height: 430px;" >      </ div >              < div  class = "ad_3"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/ad3.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "ad_4"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/ad4.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "ad_5"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/ad5.jpg"  style = "width: 320px; height: 430px;" >      </ div >              </ section >

后来修改这样就显示了:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 < section  class = "ads"  style = "top: -860px;" >      < div  class = "img_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/img1.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "img_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/img2.jpg"  style = "width: 320px; height: 430px;" >      </ div >              < div  class = "img_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/img3.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "img_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/img4.jpg"  style = "width: 320px; height: 430px;" >      </ div >      < div  class = "img_1"  style = "height: 430px; background-size: 320px 430px;" >      < img  src = "/Public/mobile/images/member_login/img5.jpg"  style = "width: 320px; height: 430px;" >      </ div >              </ section >

更多推荐

部分手机浏览器图片不显示问题

本文发布于:2023-06-10 23:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1351420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:浏览器   手机   图片

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!