将nivoslider数字改为子弹,甚至不使用主题

时间:2016-11-28 03:32:40

标签: jquery css nivo-slider

所以使用nivoslider主题,这些数字应该根据bullets.png变成子弹吗?这很奇怪,因为在我的情况下,数字保持数字。 我使用默认主题和黑暗主题,两者都不会将数字更改为项目符号。

当我检查浏览器控制台时没有错误...(我使用的是Chrome浏览器,在mozilla firefox上测试过,仍显示数字,而不是项目符号)

这个question-answer说只是使用主题会改变数字,那里也提供了小提琴,第二个小提琴使用默认主题,但我没有看到子弹,箭头或数字< / p>

来自此answer,它说我只需要从CSS文件中评论text-indent和图片background。但是不会让controlnav子弹消失吗?

这是我的问题http://alpha.rajafotocopy.com/sumatra/portal.html的链接(请使用Chrome移动视图,因为我还在构建移动设备)

任何解决这个问题的方法....?

要包含的代码:

Dark.css nivoslider主题

.theme-dark .nivoSlider a {
border:0;
display:block;
}

.theme-dark .nivo-controlNav {
text-align: left;
padding: 0;
position: relative;
z-index: 10;
}

.theme-dark .nivo-controlNav a {
display:inline-block;
width:10px;
height:10px;
background:url(bullets.png) no-repeat 0 2px;
text-indent:-9999px;
border:0;
margin: 0 2px;
}

 .theme-dark .nivo-controlNav a.active {
 background-position:0 100%;
 }

nivoslider.css

/* Control nav styles (e.g. 1,2,3...) */
.nivo-controlNav {
  text-align:center;
  padding: 15px 0;
}
.nivo-controlNav a {
    cursor:pointer;
 }
.nivo-controlNav a.active {
    font-weight:bold;
 }

Jquery.nivoslider.js

//Default settings
$.fn.nivoSlider.defaults = {
    effect: 'random',
    slices: 15,
    boxCols: 8,
    boxRows: 4,
    animSpeed: 500,
    pauseTime: 3000,
    startSlide: 0,
    directionNav: true,
    controlNav: true,
    controlNavThumbs: false,
    pauseOnHover: true,
    manualAdvance: false,
    prevText: 'Prev',
    nextText: 'Next',
    randomStart: false,
    beforeChange: function(){},
    afterChange: function(){},
    slideshowEnd: function(){},
    lastSlide: function(){},
    afterLoad: function(){}
};

我的HTML

<div id="slider" class="slider-wrapper theme-dark">

        <img src="resource/bca.png"/>
        <img src="resource/home.png"/>
        <img src="resource/bca.png"/>

</div>

1 个答案:

答案 0 :(得分:2)

在你的html主题中 - dark类不是nivo-controlNav的父类

 <div class="slider-wrapper theme-dark">  
    <div id="slider">
    <img src="resource/bca.png"/>
    <img src="resource/home.png"/>
    <img src="resource/bca.png"/>
    </div>

 </div>