<html><body> <div style="position:absolute;z-index:999;width:200px;height:200px;background:rgba(0,0,0,0.5)"></div> <div style="position:absolute;width:100px;height:100px;background:red" onclick="alert('Clickable!!')"></div></body></html>因?yàn)椤帮@示”和“交互”的區(qū)域不完全一致,所以有了這個(gè)小白問(wèn)題請(qǐng)問(wèn)能夠做到這種效果嗎?
重疊的div,上層只遮擋下層顏色,不遮擋下層監(jiān)聽(tīng)器,這樣現(xiàn)實(shí)嗎?
叮當(dāng)貓咪
2018-09-12 10:09:47