我目前正在使用免费的 unslider jquery 代码组合一个滚动图片库。 我已经实现了滚动箭头,只想添加点来显示幻灯片的数量和幻灯片的位置。我在脚本中设置了 dots: true。
这是网站上的结果: cjeffryes.comoj.com
如您所见,我的 CSS 在某种程度上得到了应用,您可以看到其中两张幻灯片有轮廓,第三张是实心的,看起来圆点本身很大。 li 点应为 10x10px 的 CSS decalres。感谢任何帮助,这是我的 CSS:
.banner
{
position:absolute;
margin-top:100px;
}
.banner li
{
list-style: none;
min-height:256px;
min-width:960px;
overflow:auto;
float:left;
}
.banner ul
{
padding: 0;
margin: 0;
float:left;
}
.dots
{
position: absolute;
left: 0;
right: 0;
bottom: 20px;
}
.dots li
{
display: inline;
width: 10px;
height: 10px;
margin: 0 4px;
text-indent: -999em;
border: 2px solid #fff;
border-radius: 600px;
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] 您将 .banner li
设置为 min-height:256px;
min-width:960px;
.
2] 只需将 min-height:none;
和 min-width:none;
添加到你的 .dots li
CSS 声明。
改变这个:
.dots li
{
display: inline;
width: 10px;
height: 10px;
margin: 0 4px;
text-indent: -999em;
border: 2px solid #fff;
border-radius: 600px;
cursor: pointer;
opacity: .4;
-webkit-transition: background .5s, opacity .5s;
-moz-transition: background .5s, opacity .5s;
transition: background .5s, opacity .5s;
}
对此:
.dots li
{
display: inline;
width: 10px;
height: 10px;
margin: 0 4px;
text-indent: -999em;
border: 2px solid #fff;
border-radius: 600px;
cursor: pointer;
opacity: .4;
-webkit-transition: background .5s, opacity .5s;
-moz-transition: background .5s, opacity .5s;
transition: background .5s, opacity .5s;
min-height:none;
min-width:none;
}
关于javascript - Unslider 点大小显得太大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23287439/