bxslider:我的一半图像没有显示(bxslider: half my images are not showing)

编程入门 行业动态 更新时间:2024-10-26 14:28:55
bxslider:我的一半图像没有显示(bxslider: half my images are not showing)

我会喜欢一些帮助。 谈到javascript,我是一个完整的新手。 我正在做我的第一个项目作为单一任务。 我已成功实现了pagepiling插件,除了两个问题外,bxslider运行良好。

我的主要问题是我有10张图片,其中只有5张正在显示。 如果我重新排序html中的图像,它总是最后五个不起作用。 我认为这意味着它是javascript的问题,但我看不到在哪里。

第二个问题出现在纵向照片上。 我设置了一个slideWidth:600,它在横向上很有效但在肖像上留下了一个白色空间。

http://www.helencrolls.com

<script> $(document).ready(function(){ $('.bxslider').bxSlider({ slideWidth: 600 }); }); </script> <ul class="bxslider"> <li><img src="images/game-bottle-tower.jpg" title="Bottle Tower Game"/></li> <li><img src="images/activity-campfire.jpg" title="Annual Sleepover Campfire"/></li> <li><img src="images/games-frog-in-the-pond.jpg" title="Playing Frog in the Pond"/></li> <li><img src="images/craft-balsa-planes.jpg" title="Making Balsa Wood Airplanes"/></li> <li><img src="images/craft-south-america.jpg" title="South American Bird Masks"/></li> <li><img src="cooking-chocolate-crackles.jpg" title="Making Chocolate Crackles"/></li> <li><img src="outdoors-childrens-garden.jpg" title="A Visit to the Children's Garden"/></li> <li><img src="outings-kite-day.jpg" title="Region Kite Day"/></li> <li><img src="games-billy-cart.jpg" title="Billy Carts at Eltham North"/></li> <li><img src="activities-totally-wild.jpg" title="A Walk on the Wild Side"/></li> <li><img src="games-duck-duck-goose.jpg" title="Joey Joey Scout (also known as Duck Duck Goose)"/></li> </ul>

I would love some assistance. I am a complete newbie when it comes to javascript. I am working on my first project as a uni assignment. I have successfully implemented the pagepiling plug in, and the bxslider is working well except for two problems.

My main problem is that I have 10 images and only five of them are showing. If I reorder the images in the html it is always the last five that don't work. I think this means it's a problem with the javascript but I can't see where.

The second problem occurs on the portrait oriented photos. I have set a slideWidth: 600 which works great on landscape but leaves a white space to the right on portrait.

http://www.helencrolls.com

<script> $(document).ready(function(){ $('.bxslider').bxSlider({ slideWidth: 600 }); }); </script> <ul class="bxslider"> <li><img src="images/game-bottle-tower.jpg" title="Bottle Tower Game"/></li> <li><img src="images/activity-campfire.jpg" title="Annual Sleepover Campfire"/></li> <li><img src="images/games-frog-in-the-pond.jpg" title="Playing Frog in the Pond"/></li> <li><img src="images/craft-balsa-planes.jpg" title="Making Balsa Wood Airplanes"/></li> <li><img src="images/craft-south-america.jpg" title="South American Bird Masks"/></li> <li><img src="cooking-chocolate-crackles.jpg" title="Making Chocolate Crackles"/></li> <li><img src="outdoors-childrens-garden.jpg" title="A Visit to the Children's Garden"/></li> <li><img src="outings-kite-day.jpg" title="Region Kite Day"/></li> <li><img src="games-billy-cart.jpg" title="Billy Carts at Eltham North"/></li> <li><img src="activities-totally-wild.jpg" title="A Walk on the Wild Side"/></li> <li><img src="games-duck-duck-goose.jpg" title="Joey Joey Scout (also known as Duck Duck Goose)"/></li> </ul>

最满意答案

这些图像都存储在您网站上的图像文件夹中。 但是,您没有将它们全部指向图像目录。

<img src="games-duck-duck-goose.jpg">

应该

<img src="images/games-duck-duck-goose.jpg">

These images are all stored in your images folder on your web site. However, you are not pointing them all to your images directory.

<img src="games-duck-duck-goose.jpg">

should be

<img src="images/games-duck-duck-goose.jpg">

更多推荐

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

发布评论

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

>www.elefans.com

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