<分区>
假设我有:
<div></div>
与:
div {
width: 500px;
height: 500px;
position: relative;
}
div:after {
content: '';
display: block;
width: 20px;
height: 20px;
position: absolute;
top: 0;
right: 0;
}
我可以做类似 $('div:after').click(function(){...});
的事情吗?如果我点击 div
而不是 div:after
,它不会触发。