Unslider dot功能无法显示

时间:2013-06-06 12:42:21

标签: function slider

我正在建立一个顶部有滑块的网站,我想使用unslider,因为它看起来很容易。

根据网站,您应该使用功能 - dots: true

我有,但我的滑块没有任何幻灯片。

The site where I'm trying to set things up

(这是一个学校项目)

2 个答案:

答案 0 :(得分:16)

尝试添加一些CSS。

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  text-align: center;
}

.dots li {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  text-indent: -999em;
  border: 2px solid #fff;
  border-radius: 6px;
  cursor: pointer;
  opacity: .4;
  -webkit-transition: background .5s, opacity .5s;
  -moz-transition: background .5s, opacity .5s;
  transition: background .5s, opacity .5s;
}

.dots li.active {
  background: #fff;
  opacity: 1;
}

答案 1 :(得分:1)

只需转到unslider.css文件并添加:

.unslider {
    overflow: auto;
    margin: 0;
    padding: 0;
    /*Added*/
    position: relative;
}

在unslider-dots.css中添加:

/*added*/
.unslider-nav{
    position: absolute;
    width: 100%;
    bottom: 2%;
}

您只需说出您的脚本nav:truedots:true

希望它也适合你。