How to get perfect border radius on images in all browsers?

前端 未结 7 469
渐次进展
渐次进展 2020-12-18 01:27

Currently I\'m getting like this in Chrome, Safari, Mobile Safari and Opera. edges are rough.

<         


        
相关标签:
7条回答
  • 2020-12-18 02:26

    You can give extra div to your img tag like this:

    body {padding:100px}

    img {
       vertical-align:bottom;
        position:relative;
        z-index:-1;
    }
    div{
        overflow:hidden;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        border-radius: 10px;
        border:3px solid red;
        display:inline-block;
    }
    

    http://jsfiddle.net/4PLUG/4/

    0 讨论(0)
提交回复
热议问题