jQuery 滑块弄乱了我的 css 渐变?
我在页面中放置了一个 jQuery 滑块,当我在其下方添加一个新的 div
并添加 float: left
时,渐变就停止在那里。这是链接。
当我不添加 float: left
时,渐变背景是正常的:s...
CSS:
body {
height: 100%;
border-top: 1px solid white;
margin:0;
background-repeat: no-repeat;
font-family: 'AandachtBold';
-webkit-font-smoothing: antialiased;
background: #cdd6de;!important;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#f4f5f5), to(#cdd6de));fixed !important;
background: -moz-linear-gradient(#f4f5f5, #cdd6de);fixed !important;
background: linear-gradient(#f4f5f5, #cdd6de);fixed !important;
-pie-background: linear-gradient(#f4f5f5, #cdd6de);fixed !important;
behavior: url(/PIE.htc);
}
JavaScript:
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/slides.min.jquery.js"></script>
<script src="js/jquery.easing.1.2.js"></script>
<script src="js/smooth-src-comments.js"></script>
<script>
$(function(){
$('#slides').slides({
preload: true,
preloadImage: 'img/loading.gif',
play: 3500,
pause: 2500,
hoverPause: true
});
});
</script>
I put a jQuery slider in my page, and when I add a new div
underneath it and add float: left
the gradient stops right there. Here's the LINK.
And when I don't add float: left
the gradient background is normal :s...
CSS:
body {
height: 100%;
border-top: 1px solid white;
margin:0;
background-repeat: no-repeat;
font-family: 'AandachtBold';
-webkit-font-smoothing: antialiased;
background: #cdd6de;!important;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#f4f5f5), to(#cdd6de));fixed !important;
background: -moz-linear-gradient(#f4f5f5, #cdd6de);fixed !important;
background: linear-gradient(#f4f5f5, #cdd6de);fixed !important;
-pie-background: linear-gradient(#f4f5f5, #cdd6de);fixed !important;
behavior: url(/PIE.htc);
}
JavaScript:
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/slides.min.jquery.js"></script>
<script src="js/jquery.easing.1.2.js"></script>
<script src="js/smooth-src-comments.js"></script>
<script>
$(function(){
$('#slides').slides({
preload: true,
preloadImage: 'img/loading.gif',
play: 3500,
pause: 2500,
hoverPause: true
});
});
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 css 代码似乎无效。
例如,
这应该是这样的
而且我以前从未见过在渐变上使用“fixed”,这可能会导致问题
尝试将我的代码与您的颜色一起使用,此代码也适用于Internet Explorer ;
Your css code seems to be invalid.
For example
This should be like so
Also I have never seen "fixed" used on a gradient before, this could be causing a problem
Try using my code below with your colors, this code works in Internet Explorer too;