对于我的网站,我正在尝试使用从向下箭头变为向上箭头的箭头。我想使用 css 更改,因为我觉得这是最简单的方法。我的代码是
$(".first1").on('click',
function () {
$('.arrow-down').css({"display" : "none"});
$('.arrow-up').css({"display" : "inline"});
},
function () {
$('.arrow-down').css({"display" : "inline"});
$('.arrow-up').css({"display" : "none"});
});
$(".last1").on('click',
function () {
$('.arrow-down').css({"display" : "none"});
$('.arrow-up').css({"display" : "inline"});
},
function () {
$('.arrow-down').css({"display" : "inline"});
$('.arrow-up').css({"display" : "none"});
});
和
.arrow-up {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 10px solid #FDFECD;
display: none;
}
.arrow-down {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 10px solid #FDFECD;
display: inline;
}