簡體   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