-
-
Save 304352303/67de4ca9b97dc5a0ec7ed0a0a08b8f16 to your computer and use it in GitHub Desktop.
Extending the hit area — with generated content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button>+</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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