javascript - Unslider 点大小显得太大

标签 javascript jquery html css gallery

我目前正在使用免费的 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/

相关文章:

javascript - 如何使用 jQuery 创建辅助函数来更改图像?

javascript - 尝试使用 axios 访问 Wikipedia Api 但出现 CORS 策略错误

jquery - 如何使用 CSS 创建管理固定背景?

html - CSS:span 和 li 的高度不匹配

javascript - jQuery .css() 不更新元素

javascript - 从 DOM 中删除元素对性能有何影响?

javascript - 为什么 Firefox DevTools 和 Firebug 控制台中有很多警告?

javascript - 为每个循环嵌套重构

javascript - 使用 PHP 代理绕过 XMLHttpRequest 的同源策略有什么缺点?

javascript - 为什么 javascript date.setDate() 改变其他日期变量的值