我的网站有 4 个子页面。我想在每个页面上以不同的高度添加 nivo slider 。我已经成功添加了 3 个 slider ,但是在一个页面上我想显示 nivo-controlNav
并且 margin top 30px,我该怎么做?
我的代码是这样的:
.nivo-controlNav {
text-align:center;
padding: 0;
}
这对我的其他 3 个页面很有用,但我想添加:
.nivo-controlNav {
text-align:center;
padding: 0;
margin-top:30px;
}
最佳答案
在
>/head>部分需要页边距的地方添加这个<script type="text/javascript">
$(document).ready(function () {
$('.nivo-controlNav').css('margin','30px');
});
</script>
如果这没有帮助,请尝试设置 z-index,如上所示的可见属性 $('.nivo-controlNav').css('z-index','1500'); $('.nivo-controlNav').css('可见性','可见');
关于javascript - Nivo Slider Nivo-control 导航边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11980846/