繁体   English   中英

溢出隐藏在 Internet Explorer 11 中不起作用

[英]Overflow hidden is not working in Internet Explorer 11

我需要在我的网站中将图像显示为圆形,所以我使用了溢出:隐藏在我的 css 代码中,它在其他浏览器中运行良好,但在 IE11 中不起作用。 这是我在 iIE11 中得到的输出

上图是我在 ie 中的输出,我的 css 代码是

img-block {
/* position: relative; */
/* background-color: #f4f4f4; */
height: 200px;
overflow: hidden;
width: 100%;
text-align: center;
display: table;
font-size: 20px;

我的 HTML 代码是

<div class="img-block">
        <div class="img">
                                <img src="https://samugam.s3.us-east-2.amazonaws.com/profiles/44/1521531048.jpg" alt="Shamini">
                        </div>
    </div>

添加此样式

img {
    border-radius: 50%;
}

您需要添加border-radius以使图像呈圆形。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM