简体   繁体   中英

Overflow hidden is not working in Internet Explorer 11

I need to display image as round shaped in my site so i used overflow:hidden in my css code it works fine in other browsers but not in IE11. 这是我在 iIE11 中得到的输出

above image is the output i got in ie and my css code is

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

and my HTML code is

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

Add this style

img {
    border-radius: 50%;
}

You need to add border-radius in order to make the image a round shape.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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