Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Border-radius on background-image [closed]

Is it possible to add border-radius on background-image ?

like image 987
Michał Urban Avatar asked Jan 16 '13 08:01

Michał Urban


People also ask

Why border radius is not working?

If there are contents within the div that has the curved corners, you have to set overflow: hidden because otherwise the child div's overflow can give the impression that the border-radius isn't working. This answer worked for me.

Is background image deprecated?

Background-image element in style sheet is not deprecated; if we must say something is deprecated, it is the inline style sheet at all; but this does not explain why other css properties are not signed, as you have assumed.


1 Answers

Yes it is possible:

div {   -webkit-border-radius: 50px;   -moz-border-radius: 50px;   border-radius: 50px;   border: none;   width: 500px;   height: 335px;   background: url(http://themescompany.com/wp-content/uploads/2012/02/6402.jpg); } 

Click here for demo.

like image 53
David Czinege Avatar answered Sep 18 '22 13:09

David Czinege