我的代码是:
p {
position: relative;
background-color: blue;
}
p:before {
content: '';
position: absolute;
left:100%;
width: 10px;
height: 100%;
background-color: red;
}
Run Code Online (Sandbox Code Playgroud)
请看这个小提琴:http://jsfiddle.net/ZWw3Z/5/
我想仅在伪元素(红色位)上触发click事件.也就是说,我不希望在蓝色位上触发click事件.