我会喜欢一些帮助。 谈到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">更多推荐
发布评论