Created
April 11, 2015 19:10
-
-
Save LeaVerou/6a1c9018b24e67186ec8 to your computer and use it in GitHub Desktop.
Does border-radius affect hit-testing?
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
| /** | |
| * Does border-radius affect hit-testing? | |
| */ | |
| img { | |
| border-radius: 50%; | |
| } | |
| div { | |
| display: inline-block; | |
| width: 100px; height: 100px; | |
| background: url("https://placeimg.com/100/100/animals") center / cover; | |
| border-radius: 50%; | |
| } | |
| img:hover, div:hover { opacity: .5 } |
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
| <img src="https://placeimg.com/100/100/animals" /> | |
| <div></div> |
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","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