隐藏

HTML 取图片中间部分,并呈圆形

发布:2021/4/27 13:47:56作者:管理员 来源:本站 浏览次数:954

<div class="a1">
    <img src="http://kings.begon.cn/upload/202104/27/202104271020235996.jpg" alt="用户头像" height="50px">
</div>

<style>
    .a1{
        position: relative;
        width: 50px;
        height: 50px;
        overflow: hidden;
        border-radius: 50%;   --->取圆形
    }
    img{
        position: absolute;
        margin: auto;
        top: -99999px;
        right: -99999px;
        bottom: -99999px;
        left: -99999px;
    }
</style>