2012-03-30 35 views
1

所以我使用Supersized插件(http://buildinternet.com/2011/07/supersized-3-2-fullscreen-jquery-slideshow/)来显示在站点后面的美好的背景图象。它通常延伸到适合您的浏览器窗口的大小。在iPad上,背景在视口的最后切断。我可以捏看到整个网站,并放大就好了。但背景仍然存在。JS超大插件 - 在视口边缘切断的图像

我需要的最重要的事情是图像填充内容的长度和高度。链接和css如下:

http://www.xsp.com/new_site/index.php

任何帮助是极大的赞赏,枪在这里下。谢谢。

/* Supersized styles */ 
    #supersized-loader { position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url(../img/progress.gif) no-repeat center center;} 

    #supersized { display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:-999; height:100%; width:100%; } 
    #supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; } 
    #supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/ 
    #supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; }   /*Quality*/ 

    #supersized li { display:block; margin: 0; list-style:none; z-index:-30; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; } 
    #supersized a { width:100%; height:100%; display:block; } 
    #supersized li.prevslide { z-index:-20; } 
    #supersized li.activeslide { z-index:-10; } 
    #supersized li.image-loading { background:#111 url(../img/progress.gif) no-repeat center center; width:100%; height:100%; } 
    #supersized li.image-loading img{ visibility:hidden; } 
    #supersized li.prevslide img, #supersized li.activeslide img{ display:inline; } 
    /* Supersized styles end */ 

回答

1

我想通过iPhone/iPad的CSS媒体查询解决它的一种方法。这可能不是最好的方式,更像是将磁带放在上面,这样它就可以保持在一起。但它的作品,所以我很高兴:

/*Fix Supersized on iOS*/ 

/* iPad [portrait + landscape] */ 
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { 
#supersized { margin-left:0;} 
} 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : portrait) { 
#supersized { width:110% !important;} 
} 


/* iPhone [portrait + landscape] */ 
@media only screen and (max-device-width: 480px) { 
#supersized { margin-left:0; } 
} 
+0

好消息是,我得到了它前一段时间的工作使用第一响应者的回答。坏消息是他们被另一家公司收购,网站设计不再。 尽管感谢这段代码。我一定会把它整合到未来的项目中。 – 2013-09-16 13:47:40

1

的问题是从设置在图像上“最大宽度:100%”的所有基地共同CSS 检查你的CSS重置,如果有什么 IMG {最大宽度:100%; }

的超大型官方对文件的解决方案“supersized.3.2.7.js”: https://github.com/buildinternet/supersized/issues/103

如果你不能按照官方的解决办法解决它,尝试在你的超大型CSS补充一点:

#supersized img { max-width: none; }

这个棘手的是http://blog.valderama.net/node/30