JS幻灯片放映不显示在指定的div下

时间:2013-10-05 17:09:54

标签: javascript jquery css html

我将使用Amazing Slider生成的幻灯片代码放入我的网站(针对学校项目),特别是在<div class = "bl-content"></div>下,不幸的是,无济于事。每当我刷新我的网站以查看它是否有效时,JS滑块就不会出现在#bl-content div下面。我尝试更改<div id = "amazingslider-1">的元素属性:我尝试将不透明度更改为1,尝试将位置更改为绝对,并尝试使用clear: both;技术。但是,所有这些都不起作用。

这是我的HTML

<div class="bl-content">
    <!-- Insert to your webpage where you want to display the slider -->
    <div id="amazingslider-1" style="display:block;position:relative;margin:16px auto 56px;">
        <ul class="amazingslider-slides" style="display:none;">
            <li><img src="image/1.JPG" />Haha</li>
            <li><img src="image/2.JPG" /></li>
            <li><img src="image/3.JPG" /></li>
            <li><img src="image/4.JPG" /></li>
            <li><img src="image/5.JPG" /></li>
        </ul>
        <ul class="amazingslider-thumbnails" style="display:none;">
            <li><img src="image/1-tn.JPG" /></li>
            <li><img src="image/2-tn.JPG" /></li>
            <li><img src="image/3-tn.JPG" /></li>
            <li><img src="image/4-tn.JPG" /></li>
            <li><img src="image/5-tn.JPG" /></li>
        </ul>
    </div>
    <h2>Silot Bay</h2>
    <p>Some Text</p> 
</div>  

这就是CSS

.bl-content, 
div.bl-panel-items > div > div {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 60px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    padding: 0 20px;
    overflow: hidden;
    overflow-y: auto;
}

/* Custom content */

.bl-content p {
    margin: 0 auto;
    padding-bottom: 15px;
    font-size: 1.7em;
    line-height: 1.8;
}

.bl-content h2 {
    font-size: 3em;
    font-weight: 300;
    margin: 0 0 20px 0;
}

.bl-content article {
    padding: 20px 40px 20px 0px;
}

.bl-content article h3 {
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    padding-top: 20px;
    font-size: 1.4em;
}

.bl-content article a {
    color: rgba(0,0,0,0.2);
}

.bl-content > ul {
    list-style: none;
    padding: 0;
    margin: 0;
} 

.bl-content > ul li {
    display: inline-block;
    width: 20%;
    margin: 1%;
}

.bl-content > ul li a {
    display: block;
    padding: 0;
    border: 8px solid rgba(0,0,0,0.1);
}

.bl-content > ul li a img {
    display: block;
    max-width: 100%;
}

0 个答案:

没有答案