I have an image placed inside a div, the div has rounded corners that work like a mask to hide the corners of the image and display them as a circle. It works in all browsers except Safari! Does anyone know how to fix this?
I tried -webkit-padding-box , -webkit-mask-box-image , but both of them did not work.
HTML:
<div class="cat"><img src="images/colorful-flowers-hd-wallpaper.jpg" /></div>
CSS
.cat{ width: 128px; height: 128px; margin: 20px 96px 0px 96px; position: relative; float: left; border-radius: 50%; overflow: hidden; border-top: 1px solid #111; border-bottom: 1px solid #fff; background: #fff; -webkit-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.6); box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.6); } .cat img{ position: absolute; border: none; width: 138px; height: 138px; top: -8px; left: -8px; cursor: pointer; }
fiddle
source share