[英]Bootstrap 3 change Carousel arrows
Hi guys i am using bootstraps Carousel options and i would like to change the arrows as i think they are ugly.大家好,我正在使用 bootstraps Carousel 选项,我想更改箭头,因为我认为它们很丑。
I would like to make them look like this :我想让它们看起来像这样:
However I'm not so sure how to do this, i tried to create them using CSS but i can only get the box to show up , so far i have :但是我不太确定如何做到这一点,我尝试使用 CSS 创建它们,但我只能让框显示出来,到目前为止我有:
HTML: HTML:
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="lnr lnr-chevron-left" aria-hidden="true"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="lnr lnr-chevron-right" aria-hidden="true"></span>
</a>
CSS: CSS:
.carousel-control.left, .carousel-control.right {
background-image: none !important;
}
.carousel-control {
font-size: 20px;
text-shadow: none;
}
.carousel-control .lnr-chevron-left {
position: absolute;
color: white;
background: #333333;
top: 48%;
left: 0;
z-index: 5;
display: inline-block;
margin-top: -10px;
float: left;
padding: 15px;
}
.carousel-control .lnr-chevron-right {
position: absolute;
color: white;
background: #333333;
top: 48%;
right: 0;
z-index: 5;
display: inline-block;
margin-top: -10px;
float: right;
padding: 15px;
}
I was using this websites Example but i cant seem to replicate it : Link here我正在使用这个网站示例,但我似乎无法复制它:链接在这里
Any help on trying to make the arrows look like this would be great任何尝试使箭头看起来像这样的帮助都会很棒
Thanks谢谢
Looking in the linear-icons.css
file, I notice there is the following:查看
linear-icons.css
文件,我注意到有以下内容:
@font-face { font-family: 'Linearicons-Free'; src:url('../fonts/Linearicons-Free.eot?w118d'); src:url('../fonts/Linearicons-Free.eot?#iefixw118d') format('embedded-opentype'), url('../fonts/Linearicons-Free.woff2?w118d') format('woff2'), url('../fonts/Linearicons-Free.woff?w118d') format('woff'), url('../fonts/Linearicons-Free.ttf?w118d') format('truetype'), url('../fonts/Linearicons-Free.svg?w118d#Linearicons-Free') format('svg'); font-weight: normal; font-style: normal; } .lnr { font-family: 'Linearicons-Free'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
Verify you have also gotten the font files as the .lnr
class uses a font they provide.验证您是否也获得了字体文件,因为
.lnr
类使用它们提供的字体。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.