CSS Jquery Easy Slider 1.7 插件

发布于 2024-10-18 05:37:35 字数 3469 浏览 5 评论 0原文

一直在尝试让 Jquery 插件 Easy Slider 1.7 正常工作。一直在搞乱它,并按照我想要的方式获得了内容区域,但下一个/上一个按钮浮动在页面顶部。

代码如下: HTML Slider

<div id="slider_container">
                <div  id="slider">
                    <ul>                
                        <li>
                            <h4>Google Adwords</h4>
                            <p>Lorem ipsum dolar sit ami....</p>
                        </li>
                        <li>
                            <h4>Domain Name</h4>
                            <p>Lorem ipsum dolar sit ami....</p>
                        </li>
                    </ul>
                </div>
            </div>

Jquery:

<script type="text/javascript">
$(document).ready(function(){   
    $("#slider").easySlider({
        auto: true,
        continuous: true,
        prevId: 'prevBtn',
        prevText: 'Previous',
        nextId: 'nextBtn',  
        nextText: 'Next' 
    });
});
</script>

CSS:

 #slider_container{
        width: 450px;
        height: 210px;
        margin: 10px auto;
        background: url(../img/sliderweb_bg.png) no-repeat;
    }

        #slider ul, #slider li,
        #slider2 ul, #slider2 li{
            margin:0;
            padding:0;
            list-style:none;
            }
        #slider2{margin-top:1em;}

        #slider li, #slider2 li{ 
            /* 
                define width and height of list item (slide)
                entire slider area will adjust according to the parameters provided here
            */ 
            width:524px;
            height:200px;
            overflow:hidden; 

            }   
        #prevBtn, #nextBtn,
        #slider1next, #slider1prev{ 
            display:block;
            width:77px;
            height:69px;
            position:absolute;
            left:-30px;
            top:71px;
            z-index:1000;
            }   
        #nextBtn, #slider1next{ 
            left:696px;
            }                                                       
        #prevBtn a, #nextBtn a,
        #slider1next a, #slider1prev a{  
            display:block;
            position:relative;
            width:77px;
            height:69px;
            background:url(../img/sliderweb_left.png) no-repeat 0 0;    
            }   
        #nextBtn a, #slider1next a{ 
            background:url(../img/sliderweb_right.png) no-repeat 0 0;   
            }   

        /* numeric controls */  

        ol#controls{
            margin:1em 0;
            padding:0;
            height:28px;    
            }
        ol#controls li{
            margin:0 10px 0 0; 
            padding:0;
            float:left;
            list-style:none;
            height:28px;
            line-height:28px;
            }
        ol#controls li a{
            float:left;
            height:28px;
            line-height:28px;
            border:1px solid #ccc;
            background:#DAF3F8;
            color:#555;
            padding:0 10px;
            text-decoration:none;
            }
        ol#controls li.current a{
            background:#5DC9E1;
            color:#fff;
            }
        ol#controls li a:focus, #prevBtn a:focus, #nextBtn a:focus{outline:none;}

希望我能得到这个排序希望它能工作:)

尽快发言并提前致谢:) 乔
/* // 简易滑块 */

Been trying to get the Jquery plugin Easy Slider 1.7 working. been messing about with it and got the content area the way i want it but the buttons for next/prev are floating at top of page.

Heres the code: HTML Slider

<div id="slider_container">
                <div  id="slider">
                    <ul>                
                        <li>
                            <h4>Google Adwords</h4>
                            <p>Lorem ipsum dolar sit ami....</p>
                        </li>
                        <li>
                            <h4>Domain Name</h4>
                            <p>Lorem ipsum dolar sit ami....</p>
                        </li>
                    </ul>
                </div>
            </div>

Jquery:

<script type="text/javascript">
$(document).ready(function(){   
    $("#slider").easySlider({
        auto: true,
        continuous: true,
        prevId: 'prevBtn',
        prevText: 'Previous',
        nextId: 'nextBtn',  
        nextText: 'Next' 
    });
});
</script>

CSS:

 #slider_container{
        width: 450px;
        height: 210px;
        margin: 10px auto;
        background: url(../img/sliderweb_bg.png) no-repeat;
    }

        #slider ul, #slider li,
        #slider2 ul, #slider2 li{
            margin:0;
            padding:0;
            list-style:none;
            }
        #slider2{margin-top:1em;}

        #slider li, #slider2 li{ 
            /* 
                define width and height of list item (slide)
                entire slider area will adjust according to the parameters provided here
            */ 
            width:524px;
            height:200px;
            overflow:hidden; 

            }   
        #prevBtn, #nextBtn,
        #slider1next, #slider1prev{ 
            display:block;
            width:77px;
            height:69px;
            position:absolute;
            left:-30px;
            top:71px;
            z-index:1000;
            }   
        #nextBtn, #slider1next{ 
            left:696px;
            }                                                       
        #prevBtn a, #nextBtn a,
        #slider1next a, #slider1prev a{  
            display:block;
            position:relative;
            width:77px;
            height:69px;
            background:url(../img/sliderweb_left.png) no-repeat 0 0;    
            }   
        #nextBtn a, #slider1next a{ 
            background:url(../img/sliderweb_right.png) no-repeat 0 0;   
            }   

        /* numeric controls */  

        ol#controls{
            margin:1em 0;
            padding:0;
            height:28px;    
            }
        ol#controls li{
            margin:0 10px 0 0; 
            padding:0;
            float:left;
            list-style:none;
            height:28px;
            line-height:28px;
            }
        ol#controls li a{
            float:left;
            height:28px;
            line-height:28px;
            border:1px solid #ccc;
            background:#DAF3F8;
            color:#555;
            padding:0 10px;
            text-decoration:none;
            }
        ol#controls li.current a{
            background:#5DC9E1;
            color:#fff;
            }
        ol#controls li a:focus, #prevBtn a:focus, #nextBtn a:focus{outline:none;}

Hope I can get this sorted want this to work :)

Speak soon and thanks in advance :)
Joe
/* // Easy Slider */

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凑诗 2024-10-25 05:37:35

更新这个

#slider_container{
        position:relative;
        width: 450px;
        height: 210px;
        margin: 10px auto;
        background: url(../img/sliderweb_bg.png) no-repeat;
}

update this

#slider_container{
        position:relative;
        width: 450px;
        height: 210px;
        margin: 10px auto;
        background: url(../img/sliderweb_bg.png) no-repeat;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文