javascript - Nivo Slider Nivo-control 导航边距

标签 javascript jquery html css nivo-slider

我的网站有 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/

相关文章:

javascript - JavaScript 中的 Tic Tac Toe

javascript - jQuery 在最后一个元素之后插入

javascript - 使用 Jquery 查找特定类的上一个 div

javascript - 为什么我的 try catch 错误没有出现?

javascript - 过滤对象数组并设置状态数组变量

javascript - Angular : use filter on ng-options when using for(key,值)

javascript - 删除项目 <tr> 引导箱

javascript - 如何使用变量设置ajax数据$key和$value

javascript - 将 HTML 元素复制并插入到新的弹出 block 中

html - 如何在 div 中强制使用 2 个 href 样式