My code is:(我的代码是:)
p {
position: relative;
background-color: blue;
}
p:before {
content: '';
position: absolute;
left:100%;
width: 10px;
height: 100%;
background-color: red;
}
Please see this fiddle: http://jsfiddle.net/ZWw3Z/5/(请查看此小提琴: http : //jsfiddle.net/ZWw3Z/5/)
I would like to trigger a click event only on the pseudo-element (the red bit).(我只想在伪元素(红色位)上触发点击事件。) That is, I don't want the click event to be triggered on the blue bit.(也就是说,我不希望在蓝色部分触发点击事件。)
ask by Randomblue translate from so