放置圖像的div是1x1像素。因此,您目前正在顯示圖庫的左上角像素(查看id爲「精選」的div上的內聯css)。 :)
正如我所承諾的。開放orbit_home.js並更換
{"z-index" : 1}
和
{"z-index" : 2}
到
{"z-index" : 1, "display" : "none"}
和
"z-index" : 3
到
"z-index" : 3, "display":"block"
中的CSS命令所有出現
最後編輯:下面的行添加到你的CSS文件的末尾:
line 88 and 91 from the orbit_home.js :
"display":"block"
到"display":"none"
爲:
function unlock() {
locked = false;
}
function lock() {
locked = true;
}
//If there is only a single slide remove nav, timer and bullets
if(slides.length == 1) {
options.directionalNav = false;
options.timer = false;
options.bullets = false;
}
//Set initial front photo z-index and fades it in
slides.eq(activeSlide)
.css({"z-index" : 3, "display":"block"})
.fadeIn(function() {
//brings in all other slides IF css declares a display: none
slides.css({"display":"block"})
});
// ==============
// ! TIMER
// ==============
變成:
函數unlock(){ locked = false; } function lock(){ locked = true; }
//If there is only a single slide remove nav, timer and bullets
if(slides.length == 1) {
options.directionalNav = false;
options.timer = false;
options.bullets = false;
}
//Set initial front photo z-index and fades it in
slides.eq(activeSlide)
.css({"z-index" : 3, "display":"block"})
.fadeIn(function() {
//brings in all other slides IF css declares a display: none
slides.css({"display":"none"})
});
// ==============
// ! TIMER
// ==============
我改變了這個正確的寬度和高度,認爲它會修復它,它所做的所有的圖像都顯示在一起堆疊在一起。 –
如果它們具有透明背景(就像它們一樣),它們將會堆疊在一起(這就是z-index的用途)。 嘗試設置「display:none;」在你不想顯示的圖像上,然後讓JS改變它來顯示所選圖像。 –
好吧,當談到javascript時,我是一個新手,但在嵌套在主幻燈片之外的工作正常。我只是想知道是否有一些原因是由於嵌套造成它的功能不正確。 –