iPhone端网站手动轮播图无法加载问题求助
轮播图在iPhone设备无法显示的问题
问题情况
- 网站的自动轮播与手动轮播图在Android设备上均可正常加载,但iPhone设备上手动轮播图无法显示
- 尝试将手动轮播改为自动轮播后,问题仍未解决
相关HTML代码
<div class="slideshow-container"> <div class="mySlides fade"> <div class="numbertext">1 / 5</div> <img id ="0" src="" style="width:100%; height: 500px;"> </div> <div class="mySlides fade"> <div class="numbertext">2 / 5</div> <img id ="1" src="" style="width:100%; height: 500px;"> </div> <div class="mySlides fade"> <div class="numbertext">3 / 5</div> <img id ="2" src="" style="width:100%; height: 500px;"> </div> <div class="mySlides fade"> <div class="numbertext">4 / 5</div> <img id ="3" src="" style="width:100%; height: 500px;"> </div> <div class="mySlides fade"> <div class="numbertext">5 / 5</div> <img id ="4" src="" style="width:100%; height: 500px;"> </div> <a class="prev" onclick="plusSlides( - 1)">❮</a> <a class="next" onclick="plusSlides(1)">❯</a> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentSlide(1)"></span> <span class="dot" onclick="currentSlide(2)"></span> <span class="dot" onclick="currentSlide(3)"></span> <span class="dot" onclick="currentSlide(4)"></span> <span class="dot" onclick="currentSlide(5)"></span> </div>
相关CSS代码
.slideshow-container { max-width:85%; position: relative; margin: auto; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; } /* Position the "next button" to the right */ .next { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ .prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); } /* Caption text */ .text { color: #f2f2f2; font-size: 20px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; text-decoration: solid; } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { height: 15px; width: 15px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active, .dot:hover { background-color: #717171; } /* Fading animation */ .fade { animation-name: fade; animation-duration: 1.5s; } @keyframes fade { from { opacity: .4 } to { opacity: 1 } }
内容的提问来源于stack exchange,提问作者lebchalet
相关产品推荐
相关产品推荐

