Internet Explorer not recognizing CSS for SVG elementsClip-path SVG polygon Internet ExplorerSVG CSS Hover StylingCSS transition on the mask of an SVG?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSHow can I transition height: 0; to height: auto; using CSS?Click through div to underlying elementsHow do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?

Taking the numerator and the denominator

"Marked down as someone wanting to sell shares." What does that mean?

What should be the ideal length of sentences in a blog post for ease of reading?

Why is indicated airspeed rather than ground speed used during the takeoff roll?

A seasonal riddle

What is this high flying aircraft over Pennsylvania?

Interpretation of rotating a quantum state

Error in master's thesis, I do not know what to do

Pre-Employment Background Check With Consent For Future Checks

Magnifying glass in hyperbolic space

How do you justify more code being written by following clean code practices?

What is it called when someone votes for an option that's not their first choice?

Hashing password to increase entropy

Can a Knock spell open the door to Mordenkainen's Magnificent Mansion?

When is the exact date for EOL of Ubuntu 14.04 LTS?

Extract substring according to regexp with sed or grep

Offset in split text content

Does capillary rise violate hydrostatic paradox?

Unfrosted light bulb

Travelling in US for more than 90 days

What is the tangent at a sharp point on a curve?

python displays `n` instead of breaking a line

1 John in Luther’s Bibel

Started in 1987 vs. Starting in 1987



Internet Explorer not recognizing CSS for SVG elements


Clip-path SVG polygon Internet ExplorerSVG CSS Hover StylingCSS transition on the mask of an SVG?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSHow can I transition height: 0; to height: auto; using CSS?Click through div to underlying elementsHow do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?













2















I have an SVG image map with hover styles on the links.



(More on SVG image maps here.)



All respectable browsers I've tested on are displaying it correctly.



IE is not having any of it (surprise!)...



(I'm only concerned with IE11, not super-archaic versions.)



Thanks to this answer to a similar question, I know that IE can display clipping paths as long as they are part of the SVG markup and not added with CSS styling.



In my case, since it's an image map, the clipping paths are inside anchor tags. Maybe this is why IE is confused, but I haven't read anywhere that it isn't supported.



Here is what I have (confirmed working in Firefox, Chrome, Safari, Opera):






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





If you run the code snippet in the aforementioned non-IE browsers, you should see the colors of the pencils appear upon hovering.



Image credit: Pixabay



Can something be done differently to get IE to recognize the clip-path links?



Update:



I've made some progress. I got a separate test file working in IE11!



Now I just have to figure out what the difference is that makes or breaks it.



Below is a code snippet with (1) a polygon path, (2) a polygon path that is a link, and (3) a polygon clip-path that is a link:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





Update 2



I've narrowed down the problem to IE not liking my CSS.



Here is a snippet where the links on clip-paths are working but the CSS is commented out. As soon as the CSS is re-enabled it breaks. (The background image has been removed in this one for the sake of simplicity.)






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





So now I am wondering if maybe it's because of where I've placed the CSS, or maybe certain kinds of CSS are unrecognized by IE when inside an SVG. The testing continues...



At this point I think it's more appropriate to change the title of this question from



Getting Internet Explorer to recognize clip-path links inside SVG



to



Internet Explorer not recognizing CSS for SVG elements



Also, IE apparently has "full basic support" for <style> inside of <svg> since version 9, according to this page. So I'm really wondering what it hates about my CSS. a:hover isn't a particularly exotic selector...



Adding /* <![CDATA[ */ (as is shown in that example) hasn't fixed the problem either.



Here are two examples of CSS :hover implementation that work in IE11:



  1. Stack Overflow: SVG CSS Hover Styling


  2. CodePen: CSS SVG hover color*

*CodePen doesn't support IE, but that hover styling works if prepared in an HTML file.










share|improve this question
























  • I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

    – Deepak-MSFT
    Mar 7 at 5:54











  • @Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

    – Mentalist
    Mar 7 at 7:17











  • @Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

    – Mentalist
    Mar 7 at 7:33















2















I have an SVG image map with hover styles on the links.



(More on SVG image maps here.)



All respectable browsers I've tested on are displaying it correctly.



IE is not having any of it (surprise!)...



(I'm only concerned with IE11, not super-archaic versions.)



Thanks to this answer to a similar question, I know that IE can display clipping paths as long as they are part of the SVG markup and not added with CSS styling.



In my case, since it's an image map, the clipping paths are inside anchor tags. Maybe this is why IE is confused, but I haven't read anywhere that it isn't supported.



Here is what I have (confirmed working in Firefox, Chrome, Safari, Opera):






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





If you run the code snippet in the aforementioned non-IE browsers, you should see the colors of the pencils appear upon hovering.



Image credit: Pixabay



Can something be done differently to get IE to recognize the clip-path links?



Update:



I've made some progress. I got a separate test file working in IE11!



Now I just have to figure out what the difference is that makes or breaks it.



Below is a code snippet with (1) a polygon path, (2) a polygon path that is a link, and (3) a polygon clip-path that is a link:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





Update 2



I've narrowed down the problem to IE not liking my CSS.



Here is a snippet where the links on clip-paths are working but the CSS is commented out. As soon as the CSS is re-enabled it breaks. (The background image has been removed in this one for the sake of simplicity.)






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





So now I am wondering if maybe it's because of where I've placed the CSS, or maybe certain kinds of CSS are unrecognized by IE when inside an SVG. The testing continues...



At this point I think it's more appropriate to change the title of this question from



Getting Internet Explorer to recognize clip-path links inside SVG



to



Internet Explorer not recognizing CSS for SVG elements



Also, IE apparently has "full basic support" for <style> inside of <svg> since version 9, according to this page. So I'm really wondering what it hates about my CSS. a:hover isn't a particularly exotic selector...



Adding /* <![CDATA[ */ (as is shown in that example) hasn't fixed the problem either.



Here are two examples of CSS :hover implementation that work in IE11:



  1. Stack Overflow: SVG CSS Hover Styling


  2. CodePen: CSS SVG hover color*

*CodePen doesn't support IE, but that hover styling works if prepared in an HTML file.










share|improve this question
























  • I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

    – Deepak-MSFT
    Mar 7 at 5:54











  • @Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

    – Mentalist
    Mar 7 at 7:17











  • @Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

    – Mentalist
    Mar 7 at 7:33













2












2








2


3






I have an SVG image map with hover styles on the links.



(More on SVG image maps here.)



All respectable browsers I've tested on are displaying it correctly.



IE is not having any of it (surprise!)...



(I'm only concerned with IE11, not super-archaic versions.)



Thanks to this answer to a similar question, I know that IE can display clipping paths as long as they are part of the SVG markup and not added with CSS styling.



In my case, since it's an image map, the clipping paths are inside anchor tags. Maybe this is why IE is confused, but I haven't read anywhere that it isn't supported.



Here is what I have (confirmed working in Firefox, Chrome, Safari, Opera):






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





If you run the code snippet in the aforementioned non-IE browsers, you should see the colors of the pencils appear upon hovering.



Image credit: Pixabay



Can something be done differently to get IE to recognize the clip-path links?



Update:



I've made some progress. I got a separate test file working in IE11!



Now I just have to figure out what the difference is that makes or breaks it.



Below is a code snippet with (1) a polygon path, (2) a polygon path that is a link, and (3) a polygon clip-path that is a link:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





Update 2



I've narrowed down the problem to IE not liking my CSS.



Here is a snippet where the links on clip-paths are working but the CSS is commented out. As soon as the CSS is re-enabled it breaks. (The background image has been removed in this one for the sake of simplicity.)






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





So now I am wondering if maybe it's because of where I've placed the CSS, or maybe certain kinds of CSS are unrecognized by IE when inside an SVG. The testing continues...



At this point I think it's more appropriate to change the title of this question from



Getting Internet Explorer to recognize clip-path links inside SVG



to



Internet Explorer not recognizing CSS for SVG elements



Also, IE apparently has "full basic support" for <style> inside of <svg> since version 9, according to this page. So I'm really wondering what it hates about my CSS. a:hover isn't a particularly exotic selector...



Adding /* <![CDATA[ */ (as is shown in that example) hasn't fixed the problem either.



Here are two examples of CSS :hover implementation that work in IE11:



  1. Stack Overflow: SVG CSS Hover Styling


  2. CodePen: CSS SVG hover color*

*CodePen doesn't support IE, but that hover styling works if prepared in an HTML file.










share|improve this question
















I have an SVG image map with hover styles on the links.



(More on SVG image maps here.)



All respectable browsers I've tested on are displaying it correctly.



IE is not having any of it (surprise!)...



(I'm only concerned with IE11, not super-archaic versions.)



Thanks to this answer to a similar question, I know that IE can display clipping paths as long as they are part of the SVG markup and not added with CSS styling.



In my case, since it's an image map, the clipping paths are inside anchor tags. Maybe this is why IE is confused, but I haven't read anywhere that it isn't supported.



Here is what I have (confirmed working in Firefox, Chrome, Safari, Opera):






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





If you run the code snippet in the aforementioned non-IE browsers, you should see the colors of the pencils appear upon hovering.



Image credit: Pixabay



Can something be done differently to get IE to recognize the clip-path links?



Update:



I've made some progress. I got a separate test file working in IE11!



Now I just have to figure out what the difference is that makes or breaks it.



Below is a code snippet with (1) a polygon path, (2) a polygon path that is a link, and (3) a polygon clip-path that is a link:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





Update 2



I've narrowed down the problem to IE not liking my CSS.



Here is a snippet where the links on clip-paths are working but the CSS is commented out. As soon as the CSS is re-enabled it breaks. (The background image has been removed in this one for the sake of simplicity.)






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





So now I am wondering if maybe it's because of where I've placed the CSS, or maybe certain kinds of CSS are unrecognized by IE when inside an SVG. The testing continues...



At this point I think it's more appropriate to change the title of this question from



Getting Internet Explorer to recognize clip-path links inside SVG



to



Internet Explorer not recognizing CSS for SVG elements



Also, IE apparently has "full basic support" for <style> inside of <svg> since version 9, according to this page. So I'm really wondering what it hates about my CSS. a:hover isn't a particularly exotic selector...



Adding /* <![CDATA[ */ (as is shown in that example) hasn't fixed the problem either.



Here are two examples of CSS :hover implementation that work in IE11:



  1. Stack Overflow: SVG CSS Hover Styling


  2. CodePen: CSS SVG hover color*

*CodePen doesn't support IE, but that hover styling works if prepared in an HTML file.






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; margin: auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

</style>

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>

<a xlink:href="">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
<a xlink:href="">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"></image>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 512px; height: 512px; margin: 20px auto;">
<svg id="artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<defs>
<clipPath id="clip-path">
<polygon id="hexa3" points="316 256 196 256 136 360 196 464 316 464 376 360 316 256" fill="none"/>
</clipPath>
</defs>
<rect id="bg" width="512" height="512" fill="#b9b8c1"/>
<a xlink:href="#">
<g id="clip_group">
<g clip-path="url(#clip-path)">
<image id="img" width="960" height="640" transform="translate(24 204) scale(0.48 0.48)" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="hexa2">
<polygon points="436 48 316 48 256 152 316 256 436 256 496 152 436 48" fill="#c4fffb"/>
</g>
</a>
<g id="hexa1">
<polygon points="196 48 76 48 16 152 76 256 196 256 256 152 196 48" fill="#eaffaf"/>
</g>
</svg>
</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 320px; margin: 20px auto;">
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">
<defs>
<!-- <style type="text/css">
a:link,
a:visited
opacity: 0;

a:hover,
a:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;

</style> -->

<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<!-- <use id="bw_img" xlink:href="#image"/> -->

<a xlink:href="#">
<g id="clip_1">
<g clip-path="url(#clip-path)">
<use id="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_2">
<g clip-path="url(#clip-path-2)">
<use id="color_img-2" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_3">
<g clip-path="url(#clip-path-3)">
<use id="color_img-3" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_4">
<g clip-path="url(#clip-path-4)">
<use id="color_img-4" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_5">
<g clip-path="url(#clip-path-5)">
<use id="color_img-5" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_6">
<g clip-path="url(#clip-path-6)">
<use id="color_img-6" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_7">
<g clip-path="url(#clip-path-7)">
<use id="color_img-7" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_8">
<g clip-path="url(#clip-path-8)">
<use id="color_img-8" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_9">
<g clip-path="url(#clip-path-9)">
<use id="color_img-9" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_10">
<g clip-path="url(#clip-path-10)">
<use id="color_img-10" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_11">
<g clip-path="url(#clip-path-11)">
<use id="color_img-11" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
<a xlink:href="#">
<g id="clip_12">
<g clip-path="url(#clip-path-12)">
<use id="color_img-12" data-name="color_img" xlink:href="#image"/>
</g>
</g>
</a>
</svg>
</div>
</body>
</html>






css svg css-transitions internet-explorer-11 imagemap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 15:41







Mentalist

















asked Mar 6 at 8:34









MentalistMentalist

231415




231415












  • I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

    – Deepak-MSFT
    Mar 7 at 5:54











  • @Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

    – Mentalist
    Mar 7 at 7:17











  • @Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

    – Mentalist
    Mar 7 at 7:33

















  • I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

    – Deepak-MSFT
    Mar 7 at 5:54











  • @Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

    – Mentalist
    Mar 7 at 7:17











  • @Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

    – Mentalist
    Mar 7 at 7:33
















I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

– Deepak-MSFT
Mar 7 at 5:54





I try to check for the issue with IE 11 and I am able to produce the issue but did not get any working solution for this issue. From the documentation, I find that,"Browsers can have differing behavior when HTML CSS properties are set on SVG elements, for example Edge & IE browsers do not respond to the height property while Chrome does." Check in known issues i.postimg.cc/d0fFfDhJ/76.png Ref: caniuse.com/#feat=svg-html

– Deepak-MSFT
Mar 7 at 5:54













@Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

– Mentalist
Mar 7 at 7:17





@Deepak-MSFT Thanks for taking a look. That's a good point about the way it's worded on caniuse. It's frustrating not to have documentation on the details of said "differing behavior".

– Mentalist
Mar 7 at 7:17













@Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

– Mentalist
Mar 7 at 7:33





@Deepak-MSFT I think I just figured it out! Will do just a bit more testing and put an answer together.

– Mentalist
Mar 7 at 7:33












1 Answer
1






active

oldest

votes


















1














The answer is...



For opacity transitions in an SVG, IE needs an opacity greater than zero!



a.hover_area:link, a.hover_area:visited opacity: 0.001


Otherwise it just throws it out, like "heyyyyy, won't be needing this invisible thing!" despite having been told to expect a transition: transition-property: opacity;



Here's a snippet, working in IE11:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>








share|improve this answer

























  • Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

    – Deepak-MSFT
    Mar 8 at 2:37











  • @Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

    – Mentalist
    Mar 8 at 9:49










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55018692%2finternet-explorer-not-recognizing-css-for-svg-elements%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The answer is...



For opacity transitions in an SVG, IE needs an opacity greater than zero!



a.hover_area:link, a.hover_area:visited opacity: 0.001


Otherwise it just throws it out, like "heyyyyy, won't be needing this invisible thing!" despite having been told to expect a transition: transition-property: opacity;



Here's a snippet, working in IE11:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>








share|improve this answer

























  • Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

    – Deepak-MSFT
    Mar 8 at 2:37











  • @Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

    – Mentalist
    Mar 8 at 9:49















1














The answer is...



For opacity transitions in an SVG, IE needs an opacity greater than zero!



a.hover_area:link, a.hover_area:visited opacity: 0.001


Otherwise it just throws it out, like "heyyyyy, won't be needing this invisible thing!" despite having been told to expect a transition: transition-property: opacity;



Here's a snippet, working in IE11:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>








share|improve this answer

























  • Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

    – Deepak-MSFT
    Mar 8 at 2:37











  • @Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

    – Mentalist
    Mar 8 at 9:49













1












1








1







The answer is...



For opacity transitions in an SVG, IE needs an opacity greater than zero!



a.hover_area:link, a.hover_area:visited opacity: 0.001


Otherwise it just throws it out, like "heyyyyy, won't be needing this invisible thing!" despite having been told to expect a transition: transition-property: opacity;



Here's a snippet, working in IE11:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>








share|improve this answer















The answer is...



For opacity transitions in an SVG, IE needs an opacity greater than zero!



a.hover_area:link, a.hover_area:visited opacity: 0.001


Otherwise it just throws it out, like "heyyyyy, won't be needing this invisible thing!" despite having been told to expect a transition: transition-property: opacity;



Here's a snippet, working in IE11:






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>








<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>





<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="width: 480px; height: 640px; margin: 20px auto;"> <!-- IE needs width AND height specified to scale the SVG inside correctly. -->

<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 960 640">

<filter id="desaturate">
<feColorMatrix
type='matrix'
values="0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 1 0 "
/>
</filter>

<style type="text/css">
/* <![CDATA[ */
a.hover_area:link,
a.hover_area:visited
opacity: 0.001; /* Must be greater than 0 for IE! */

a.hover_area:hover,
a.hover_area:active
opacity: 1;
transition-property: opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;


.desaturated
filter:url("#desaturate");

/* ]]> */
</style>

<defs>
<clipPath id="clip-path">
<polygon id="_1" data-name="1" points="514 303 495 298 573 72 639 -25 796 -25 679 149 514 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<polygon id="_2" data-name="2" points="518 320 518 303 679 149 980 -11 980 139 738 269 518 320" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<polygon id="_3" data-name="3" points="509 333 538 349 729 400 997 405 997 280 738 269 509 333" fill="none"/>
</clipPath>
<clipPath id="clip-path-4">
<polygon id="_4" data-name="4" points="500 357 675 512 938 654 980 654 980 527 729 400 518 344 500 357" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<polygon id="_5" data-name="5" points="762 662 681 528 509 365 495 371 571 603 609 668 762 662" fill="none"/>
</clipPath>
<clipPath id="clip-path-6">
<polygon id="_6" data-name="6" points="538 661 543 583 500 386 490 353 480 353 409 580 409 661 538 661" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<polygon id="_7" data-name="7" points="189 654 298 492 456 353 470 353 476 365 397 580 343 661 189 654" fill="none"/>
</clipPath>
<clipPath id="clip-path-8">
<polygon id="_8" data-name="8" points="-17 608 266 493 456 353 435 344 227 371 -24 465 -17 608" fill="none"/>
</clipPath>
<clipPath id="clip-path-9">
<polygon id="_9" data-name="9" points="-10 365 227 371 466 325 216 240 -24 225 -10 365" fill="none"/>
</clipPath>
<clipPath id="clip-path-10">
<polygon id="_10" data-name="10" points="456 303 295 120 78 -25 -24 -25 -24 68 221 230 443 310 456 303" fill="none"/>
</clipPath>
<clipPath id="clip-path-11">
<polygon id="_11" data-name="11" points="312 127 233 -25 385 -25 436 85 480 292 476 303 456 303 312 127" fill="none"/>
</clipPath>
<clipPath id="clip-path-12">
<polygon id="_12" data-name="12" points="480 293 496 299 565 69 565 -21 436 -17 436 75 480 293" fill="none"/>
</clipPath>
<image id="image" width="960" height="640" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</defs>

<image id="bw_img" class="desaturated" width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>

<a xlink:href="#" class="hover_area">
<g id="_1-2" data-name="1">
<g clip-path="url(#clip-path)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_2-2" data-name="2">
<g clip-path="url(#clip-path-2)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_3-2" data-name="3">
<g clip-path="url(#clip-path-3)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_4-2" data-name="4">
<g clip-path="url(#clip-path-4)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_5-2" data-name="5">
<g clip-path="url(#clip-path-5)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_6-2" data-name="6">
<g clip-path="url(#clip-path-6)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_7-2" data-name="7">
<g clip-path="url(#clip-path-7)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_8-2" data-name="8">
<g clip-path="url(#clip-path-8)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_9-2" data-name="9">
<g clip-path="url(#clip-path-9)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_10-2" data-name="10">
<g clip-path="url(#clip-path-10)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_11-2" data-name="11">
<g clip-path="url(#clip-path-11)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
<a xlink:href="#" class="hover_area">
<g id="_12-2" data-name="12">
<g clip-path="url(#clip-path-12)">
<image width="960" height="640" xlink:href="https://i.stack.imgur.com/IacTT.jpg"/>
</g>
</g>
</a>
</svg>

</div>
</body>
</html>






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 8 at 15:32

























answered Mar 7 at 8:39









MentalistMentalist

231415




231415












  • Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

    – Deepak-MSFT
    Mar 8 at 2:37











  • @Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

    – Mentalist
    Mar 8 at 9:49

















  • Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

    – Deepak-MSFT
    Mar 8 at 2:37











  • @Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

    – Mentalist
    Mar 8 at 9:49
















Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

– Deepak-MSFT
Mar 8 at 2:37





Thanks for posting the solution for this issue. I suggest you to try to mark your own answer as an accepted answer for this question after 24 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.

– Deepak-MSFT
Mar 8 at 2:37













@Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

– Mentalist
Mar 8 at 9:49





@Deepak-MSFT Done! ^_^ I hope this will save others from having to spend as much time as I did solving this.

– Mentalist
Mar 8 at 9:49



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55018692%2finternet-explorer-not-recognizing-css-for-svg-elements%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved