In my HTML code, I got a <div>
. When the user taps anywhere inside that div, I'd like to alter various properties, like text size and background color. To me, this sounds a lot like creating two CSS styles for each state sounds like it should work, so I created the following CSS:
div.tappable {
background-color: red;
font-size: 10pt;
}
div.tappable:active {
background-color: green;
font-size: 12pt;
}
For some reason, the :active
style is never used. Am I doing something wrong?