Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Last active September 28, 2021 21:23
Show Gist options
  • Save csssecrets/d76ac0acc80923d47106 to your computer and use it in GitHub Desktop.
Save csssecrets/d76ac0acc80923d47106 to your computer and use it in GitHub Desktop.
Extending the hit area — with generated content
/**
* Extending the hit area — with generated content
*/
button {
position: relative;
padding: .3em .5em;
background: #58a;
border-radius: 50%;
border: 1px solid rgba(0,0,0,.3);
box-shadow: 0 .1em .2em -.05em rgba(0,0,0,.5);
color: white;
font: bold 150%/1 sans-serif;
cursor: pointer;
}
button:before {
content: '';
position: absolute;
top: -10px; right: -10px;
bottom: -10px; left: -10px;
}
<button>+</button>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment