我的网站 qubik-design.co.nf 出现问题,当我处于“联系”或“Quienes somos”等位置时,我的背景图像被缩放,它完全适合高度,我希望它显示为首页背景。停用背景正确显示的超大标签,但会产生错误并出现无限滚动。
<ul id="supersized" class="quality" style="visibility: visible;">
<li class="slide-0 activeslide">
<a target="_blank">
<img src="http://qubik-design.co.nf/wp-content/uploads/2015/08/intro-bg1.jpg" style="width: 1903px; top: -469.5px; left: 0px; height: 1427.25px;">
</a>
</li>
</ul>
supersized.css:
#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(../images/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; 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(../images/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; max-width:none; }
我已经尝试了几个更改:修改 supersized.css 没有解决任何问题,错误可能在 supersized.3.2.7.js 文件中,但我不知道要在其中修改什么。也许错误是img的样式,但我不知道在哪里修改它。在此先感谢。
最佳答案
您似乎在两个地方包含背景图片:首先在 <body
上标记并再次出现在一个超大元素中(看起来它是由脚本添加的)。
如果您无法关闭脚本,只需使用以下命令将其隐藏:
#supersized { display:none; }
它会回退到正文背景。
关于javascript - 放大的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32121173/