0
如何將其變成切換按鈕?所以當按鈕被點擊時,它會切換明暗背景。用開關切換背景圖像(jQuery)
$(document).ready(function(){
$("button").click(function(){
$(".content1").css("background-image", "url(../images/light.png)");
});
});
CSS
.content1 {
background-image: url('../images/dark.png');
}
感謝
撥動一類... – epascarello