sor滑块用户的jssor是否可以制作带有动态图像的jssor滑

sor滑块用户的jssor是否可以制作带有动态图像的jssor滑

本文介绍了jssor滑块用户的jssor是否可以制作带有动态图像的jssor滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中制作了一个jssor滑块,它工作正常.我决定将数据库添加到我的项目中,我想将图像地址保存到数据库中,这样我就可以将图像添加到滑块中.

I have made a jssor slider in my project it is working perfectly. I have decide to add database to my project and i want to save image address to database so i can i just add images to slider.

1.我的问题是可以将动态图片添加到jssor滑块吗?

1.My question is it possible to dynamic images to jssor slider?

2.我想要的是从数据库中获取所有图像,并且我会做一个foreach来显示图像

2.What i want is from database i will get all images and i will do a foreach to show images

这就是我编写代码的方式

this is how i do the code

<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 720px; height: 480px;
            overflow: hidden;">
            <?php
                foreach (LoadImageGallery() as $value){
                    echo $value['searchresultbigimg'];
                    echo "<li><img src=\"admin/".$value['searchresultbigimg']."\"></li>";
                    echo $value['searchresultthumbnailimg'];
                    echo "<li><img src=\"admin/".$value['searchresultthumbnailimg']."\"></li>";
                }
            ?>

        </div>

UPDATE

当我尝试您的解决方案时,我收到此错误jssor先生,这是我尝试的Slides html code definition error, there must be at least 1 slide to initialize a slider.

i get this error when i tried your solution sir jssor this is what i triedSlides html code definition error, there must be at least 1 slide to initialize a slider.

<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 600px; height: 300px; overflow: hidden;">

            <?php
                foreach (LoadImageGallery() as $value){
                    echo $value['searchresultbigimg'];
                    echo "<div><img src=\"admin/".$value['searchresultbigimg']."\"></div>";
                    echo $value['searchresultthumbnailimg'];
                    echo "<div><img src=\"admin/".$value['searchresultthumbnailimg']."\"></div>";
                }
            ?>

        </div>

推荐答案

是的,您可以,而且正在途中.

Yes, you can and you are on your way.

但是您应该使用"DIV"而不是"LI".

But you should use 'DIV' instead of 'LI'.

Jssor Slider幻灯片html代码如下,

Jssor Slider slide html code is as below,

<div><img u="image" src="image.jpg" /></div>

参考 http://www.jssor.com/development/define -slides-html-code.html

这篇关于jssor滑块用户的jssor是否可以制作带有动态图像的jssor滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 02:41