首页 > 解决方案 > 金立手机的图像不支持边框半径,当我将边框半径赋予图像时,图像会隐藏

问题描述

金立手机的边界半径问题

border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;

但这对我不起作用,然后我尝试将图像放入 div 中,然后为

border-radius:5px;
overflow: hidden;
padding: 6px;
border: 4px solid #ffffff;

标签: htmlcssandroid-browser

解决方案


您可以使用此代码

        body {
            margin: 0;
            padding: 0;
        } 
        .items {
            border-radius: 10px;
            overflow: hidden;
            padding: 6px;
            border: 4px solid #000000;
            width: auto;
            display: inline-block;
            margin: 50px;
        }
        .items img {
            border-top-left-radius: 30px;
            border-top-right-radius: 30px;
            border-bottom-left-radius: 30px;
            border-bottom-right-radius: 30px;
        }
<div class="items">
        <img src="https://images.livemint.com/rf/Image-621x414/LiveMint/Period2/2017/04/15/Photos/Processed/gionee-kqBG--621x414@LiveMint.jpg">
    </div>


推荐阅读