Javascript Fancybox关闭按钮没有';不显示

Javascript Fancybox关闭按钮没有';不显示,javascript,jquery,css,fancybox,Javascript,Jquery,Css,Fancybox,这是jQuery fancybox库的代码。由于某些原因,关闭按钮未显示。请帮帮我。我想用我自己的关闭按钮。在浏览器中,当我检查背景图像时,背景图像被删除,但位于正确的文件夹中。图像上有一条线 $(window).load(function(){ // Gallery if(jQuery("#gallery").length){ // Fancybox jQuery("#gallery li a").fancybox({ "titleShow" : fal

这是jQuery fancybox库的代码。由于某些原因,关闭按钮未显示。请帮帮我。我想用我自己的关闭按钮。在浏览器中,当我检查背景图像时,背景图像被删除,但位于正确的文件夹中。图像上有一条线

$(window).load(function(){ 

// Gallery
if(jQuery("#gallery").length){


    // Fancybox
    jQuery("#gallery li a").fancybox({
        "titleShow" : false,
        "transitionIn"  : "elastic",
        "transitionOut" : "elastic",
                    "showCloseButton" : true
    });


    var totalImages = jQuery("#gallery > li").length, 
        imageWidth = jQuery("#gallery > li:first").outerWidth(true),
        totalWidth = imageWidth * totalImages,
        visibleImages = Math.round(jQuery("#gallery-container").width() / imageWidth),
        visibleWidth = visibleImages * imageWidth,
        stopPosition = (visibleWidth - totalWidth);

    jQuery("#gallery").width(totalWidth);


    jQuery("#gallery-prev").click(function(){
        if(jQuery("#gallery").position().left < 0 && !jQuery("#gallery").is(":animated")){
            jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
        }
        return false;
    });

    jQuery("#gallery-next").click(function(){
        if(jQuery("#gallery").position().left > stopPosition && !jQuery("#gallery").is(":animated")){
            jQuery("#gallery").animate({left : "-=" + imageWidth + "px"});
        }
        return false;
    });



}

});
$(窗口).load(函数(){
//画廊
if(jQuery(“#gallery”).length){
//幻想箱
jQuery(“#画廊李a”).fancybox({
“标题秀”:假,
“transitionIn”:“弹性”,
“transitionOut”:“弹性”,
“showCloseButton”:真
});
var totalImages=jQuery(“#gallery>li”)。长度,
imageWidth=jQuery(“#gallery>li:first”)。外层宽度(true),
totalWidth=imageWidth*totalImages,
VisibleMages=Math.round(jQuery(“#gallery container”).width()/imageWidth),
visibleWidth=visibleImages*imageWidth,
停止位置=(可视宽度-总宽度);
jQuery(“#gallery”).width(总宽度);
jQuery(“#gallery prev”)。单击(函数(){
如果(jQuery(“#gallery”).position().left<0&&!jQuery(“#gallery”).is(“:animated”)){
jQuery(“#gallery”).animate({左:“+=”+imageWidth+“px”});
}
返回false;
});
jQuery(“#gallery next”)。单击(函数(){
如果(jQuery(“#gallery”).position().left>stopPosition&&!jQuery(“#gallery”).is(“:animated”)){
jQuery(#gallery”).animate({左:“-=”+imageWidth+px});
}
返回false;
});
}
});

检查您的fancybox图像是否放置在正确的文件夹中。您能否澄清“图像上有一行”是什么意思?这是样式检查器中的一行吗?如果是这样的话,听起来好像你已经用其他东西覆盖了样式,那么线条就在背景图像上。我不明白覆盖在哪里,我只在花式css框中使用此图像。@kubuslemiszewwski:很可能您有一个通用css规则,如
a{text decoration:underline}
。。。还要确保fancybox png精灵/图像与fancybox css文件位于同一文件夹中(除非您编辑了原始文件)