简体   繁体   中英

Style SVG image with CSS

In IE10 and IE11 I must use SVG tag for images.
The images are rendered properly, but not their styles (border-radius) .
how can I apply the styles (border-radius) to the images in IE10+.

border-radius: 4px;

I need to support all major browsers (Webkit, Mozilla, IE8+)


My example
http://jsfiddle.net/KDtAX/3298/
Here you can see (In all browsers, I think, except IE10+) the images has round-corners, but when you open it in IE10+, it doesn't.

I found some post describing a possible solution.
Here is a live example

Working: http://jsfiddle.net/KDtAX/3304/

New code:

svg, img {
    border-radius: 8px;
    border: thin solid black;
}

I think all that was needed was a rule for svg, and img.

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