Is there a css only solution for this problem? I want to be able to fade in div right after SVG, but only when user hovers SVGs polygon.
The code would look something like this:
<svg version="1.1" id="path" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
viewBox="0 0 232.077 138.555" enable-background="new 0 0 232.077 138.555"
xml:space="preserve">
<polygon fill="#FFFFFF" fill-opacity="0" stroke="#FFFFFF" stroke-width="4" stroke-miterlimit="10" points="3.059,134.255
3.778,17.055 24.495,24.928 178.323,3.52 229.238,16.201 229.238,89.779 "></polygon>
</svg>
<div class="hover"></div>
If I would want to make this work with SVG (not svg polygon), I would write css like this:
svg + .hover{
opacity:0;
-webkit-transition: opacity .3s ease;
-moz-transition: opacity .3s ease;
-ms-transition: opacity .3s ease;
-o-transition: opacity .3s ease;
transition: opacity .3s ease;
}
svg:hover + .hover{
opacity:1;
}