JS_0005:按钮点击加亮
html: <div class="homeWxq" onclick="openWxq(this)"></div> css: .homeWxq{ position: absolute; width: 19.5%; height: 35.6%; top: 50%; left: 40.1%; transform: translate(0,-50%); background-size: contain; background-position: center; background-repeat: no-repeat; background-image: url('../img/homeWxq.png'); pointer-events: auto; } .homeWxq:active{ position: absolute; width: 19.5%; height: 35.6%; top: 50%; left: 40.1%; transform: translate(0,-50%); background-size: contain; background-position: center; background-repeat: no-repeat; background-image: url('../img/homeWxqA.png'); pointer-events: auto; }
琥珀君的博客