Home > Web Front-end > HTML Tutorial > css How to bind to the click event of the container when an element within the container is clicked_html/css_WEB-ITnose

css How to bind to the click event of the container when an element within the container is clicked_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:57:35
Original
912 people have browsed it

<div class="btn-today glow three-btn">    <span class="rb">本        <span class="rt">ben</span>    </span></div>
Copy after login

.btn-today:active{    background: rgb(255,255,255);}
Copy after login

When I click 'this' inside , the style btn-today:active cannot be activated. Clicking outside can activate it.
Is there any way to solve this problem? Thanks. . . .


Reply to discussion (solution)

should be .rb:active{
background: rgb(255,255,255);
}

.btn-tody>span{
pointer-events: none;
}

.btn-tody>span{
pointer-events : none;
}


Can pointer-events ignore upper-level events or ignore and activate lower-level events? I tried it and there was no change.
I want the background of the container to change color. On the same page, IE has this problem, but FF and Chrome have no problem
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template