div click css code example
Example 1: css on click
<!DOCTYPE html>
<html>
<head>
<style>
a:active {
background-color: yellow;
}
button:focus {
background-color: yellow;
}
h1:hover {
background-color: red;
}
p:hover {
background-color: red;
}
</style>
</head>
<body>
<a href="#">Click Me</a>
<button>Click me</button>
<h1>Hover over me</h1>
<p>Hover over me</p>
</body>
</html>
Example 2: css clicked event
CSS clicked event
:active {
css declarations;
}
Example 3: css on click
something:active {}
Example 4: css div click through
CSS:
pointer-events: none;
background: url('your_transparent.png');
IE11 conditional:
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='your_transparent.png', sizingMethod='scale');
background: none !important;