Created
June 25, 2013 16:04
-
-
Save adamcbrewer/5859738 to your computer and use it in GitHub Desktop.
CSS: overflow/border-radius mask bug-thingy
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
/* | |
* There's a bug in Chrome/Safari using overflow:hidden with border-radius. This mask fixes it. | |
* Solution: http://stackoverflow.com/questions/5736503/how-to-make-css3-rounded-corners-hide-overflow-in-chrome-opera/10296258#10296258 | |
*/ | |
.masked { | |
position: absolute; | |
border-radius: 10px; | |
overflow: hidden; | |
/* this fixes the overflow:hidden in Chrome */ | |
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC); | |
} |
Thank you very much, this solved my problem!
P.S. greetings from 2020
@Libidine you're welcome! It would be amazing if this is still an issue :)
Thank you so much! You also saved me~ I hava tried for 3.5 hours this evening! Thanks to your solution I fixed my problem
Great! 2022 and still relevant. ๐
Oh yes, thank you! Such a pain in the ass. And still relevant in 2023... ๐
Works like charm. Thanks for sharing <3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much @sergeylaptev and @adamcbrewer !
Both your solutions worked for me!
I came here because I had an element with border radius and elements with position sticky where were "overflowing" beyond their container.