CSS/HTML:如何在全页 JS 上自定义箭头?

2024-02-05

我正在使用全页 JShttps://github.com/alvarotrigo/fullPage.js/ https://github.com/alvarotrigo/fullPage.js/制作我的网站。 但是,当尝试更改箭头样式时:

.controlArrow.prev {
    left: 50px;
    background: url(left.png);
    background-repeat: no-repeat;
}
    
.controlArrow.next {
    right: 50px;
}

它不起作用,有人可以解释为什么吗?

或者,有没有办法添加自定义箭头 html 标记?


扩展@Alvaro的答案,您需要用图像替换默认的边框箭头,如下所示:

.fp-controlArrow.fp-prev {
    left: 0;
    border: none;
    width: 50px;
    height: 101px;
    background: url(left.png) no-repeat;
    cursor: pointer;
}
.fp-controlArrow.fp-next {
    right: 0;
    border: none;
    width: 50px;
    height: 101px;
    background: url(right.png) no-repeat;
    cursor: pointer;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CSS/HTML:如何在全页 JS 上自定义箭头? 的相关文章