2015-09-10 130 views
0

我正在尝试从css文件更改Flexslider箭头设计,但失败。 我给我的屏幕截图,我想要的东西和笏:D 或者有什么方法可以改变flexslider图标或字体? 这是我的工作:http://i.stack.imgur.com/4fgcU.png 这是我想做的事:http://i.stack.imgur.com/zhxqI.png如何更改jquery Flexslider箭头设计?

<ul> 
    <li><a href="#" title="Previous"><span class="icon icon-arrow-left8"></span></a> 
    </li> 
    <li><a href="#" title="Next"><span class="icon icon-arrow-right8"></span></a> 
    </li> 
</ul> 
+0

为什么不使用字体真棒图标? – Zl3n

回答

1

如果你不想碰的字体或增加包含图标匹配您的设计, 可以实现通过类似的新字体重写CSS:

.flex-direction-nav a { 
    display: block; 
    width: 40px; 
    height: 40px; 
    margin: -20px 0 0; 
    position: absolute; 
    top: 50%; 
    z-index: 10; 
    overflow: hidden; 
    opacity: 0; 
    cursor: pointer; 
    color: rgba(0, 0, 0, 0.8); 
    text-shadow: none; 
    -webkit-transition: all 0.3s ease-in-out; 
    -moz-transition: all 0.3s ease-in-out; 
    -ms-transition: all 0.3s ease-in-out; 
    -o-transition: all 0.3s ease-in-out; 
    transition: all 0.3s ease-in-out; 
    color: #fff; 
    background-color: #000; 
    border-radius: 50%; 
    text-align: center; 
} 
.flex-direction-nav a:before { 
    font-family: "flexslider-icon"; 
    font-size: 20px; 
    display: inline-block; 
    content: '\f001'; 
    color: #FFF; 
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); 
    line-height: 40px; 
} 
.flex-direction-nav .flex-next { 
    right: -50px; 
    text-align: center; 
} 

下面是结果: enter image description here