4
我試圖用EasySlider 1.7來獲得一個很好的覆蓋效果。這不僅應該包括圖像,還應該包含代表圖像的文字。現在,我無法在需要的頁面上排列文字。受EasySlider Javascript影響的CSS 1.7
http://intranet.streamflame.com
這是主頁,在這裏你看到主滾動圖像上的黑色覆蓋的部分是其中的文本應該坐下。現在,如果我擺脫代碼滾動文本,文本坐落在它應該在的地方。但是,只要我添加腳本以同時滾動文本,它似乎會使文本消失。
這是我的代碼。
HTML:
<div class="filler">
<div class="filler-picture">
<div class="filler-img">
<ul>{% for project in rotations %}
<li><img src="{% thumbnail project.key_image.get_absolute_url 559x361 crop,upscale %}" width="559" height="361" alt="{{ project.title }}" /></li>
{% endfor %}
</ul>
</div>
<div class="filler-mask">
<img src="{{ MEDIA_URL }}img/filler.png" alt="filler" />
</div>
<div class="filler-text">
<ul>
<li>
<span class="filler-text-left">WaterTiger</span>
<span class="filler-text-right">Project watertiger is a test project whilst we get all the site together, call it a filler if you must, there is no project watertiger your only dreaming.</span>
</li>
<li>
<span class="filler-text-left">Dragonfly</span>
<span class="filler-text-right">Project Dragonfly is a test project whilst we get all the site together, call it a filler if you must, there is no project dragonfly your only dreaming.</span>
</li>
<li>
<span class="filler-text-left">Spacemunch</span>
<span class="filler-text-right">Project Spacemunch is a test project whilst we get all the site together, call it a filler if you must, there is no project Spacemunch your only dreaming.</span>
</li>
</ul>
CSS:
.filler {
position: relative;
margin-left:20px;
height:361px;
width:559px;
float:left;
}
.filler-mask {
position: absolute;
left:0; top:0;
height:361px;
width:559px;
z-index: 100;
}
.filler-img{
position: absolute;
left:0; top:0;
height:361px;
width:559px;
z-index: 50;
}
.filler-text {
width: 558px;
height: 68px;
position: absolute;
z-index: 200;
color: #fff;
}
.filler-text li {
list-style-type: none;
z-index: 1000;
}
.filler-text-left {
width: 169px;
float: left;
height: 48px;
padding: 10px;
font-size: 18pt;
font-weight: 100;
}
.filler-text-right {
width: 340px;
float: right;
height: 48px;
padding: 10px;
font-size: 10pt;
}
EasySlider的Javascript:
<script type="text/javascript">
$(document).ready(function(){
$(".filler-text").easySlider({
auto: true,
continuous: true,
speed: 1800,
pause: 5000,
nextId: "next2",
prevId: "prev2"
});
$(".filler-img").easySlider({
auto: true,
continuous: true,
speed: 1800,
pause: 5000,
nextId: "next2",
prevId: "prev2"
});
});
</script>
注意:我已經嘗試將腳本放在腳本下面,用於圖像的腳本,但它的外觀沒有改變。
希望有人能幫忙。
即使使用這個clearfix,它仍然沒有任何效果。 – 2010-07-18 07:59:22
您可以在我的示例文檔中查看最終輸出:http://sachicomputer.com/kabin/samples/jslidertest.htm 它是您的doc文檔的副本。只有你必須添加上面的clearfix並使用以下命令來管理頂部位置: – KoolKabin 2010-07-18 09:37:35
確定,以便該位正在工作,但現在當圖片滑動時其溢出。也許這是一個大小問題,但是當它回到起始圖像時它會再次重置? – 2010-07-22 21:32:42