2 porry123 porry123 于 2015.06.18 10:44 提问

jquery xslider 效果没出来,麻烦老师指点一下
.product_content{ margin-left:40px; width:952px; border:1px solid #955902; height:350px; float:left; position:relative;}
.slider{ width:952px; height:350px;overflow:hidden; position:relative;}
.slider ul{position:absolute;left:0px;top:0px; width:20000px;}
.slider ul li{float:left;width:289px; height:289px; margin-left:22px; margin-top:25px; }
.product{ width:289px; height:289px; overflow:hidden;}
.product img { border:0px; width:289px; height:289px;}


<div class="product_content" id="s">
                    <div class="slider">
                        <ul>
                                                    <li><div class="product"><a href="#"><img src="images/xxx.jpg" /></a></div></li>
                                                    <li><div class="product"><a href="#"><img src="images/xxx.jpg" /></a></div></li>
                                                    <li><div class="product"><a href="#"><img src="images/xxx.jpg" /></a></div></li>
                                                </ul>
                    </div>
                </div>

<script type="text/javascript" src="Scripts/Xslider.js"></script>
<script type="text/javascript">
    $("#s").Xslider({
        unitdisplayed: 3,
        numtoMove: 2,
        loop: "cycle",
        autoscroll: 2000
    });

</script>                               

2个回答

showbo
showbo   Ds   Rxr 2015.06.18 11:22

你导入了jquery框架没用?插件和jquery路径是否正确,还有插件的css都有正确导入没有。自己用开发工具看下

beacon_2011
beacon_2011   Rxr 2015.06.19 13:32

有没有报js错位呀?站一下

Csdn user default icon
上传中...
上传图片
插入图片