Targeting a g id in an SVG for rollovers -
I am working with a SVG file which is output from Adobe Illustrator, so there is probably some unnecessary code. After searching and searching I was able to come up with it.
& lt ;? Xml-stylesheet type = "text / css" href = "SVG_css.css"? & Gt; Path: Hover {fill: # 005289; } that gets rollover to work with an external stylesheet, but certainly targets each path in the form of rollovers. For example, I need to target routes. A group therefore exposes three elements when rolled over here is the code structure with Illustrator.
& lt; G id = "WIRE_ROOM" & gt; & Lt; Path = "#BcBCEC0" D = "M357.3, 24.4c0,0.6-0.6,1-1.4,1H-8.1C-0.8,0-1.4-0.5-1.4-P-8.9c0-0.6,0.6 -1.14 -1h8.1c0.8,0,1.4,0.5,1.4,1 V24.4z "/> & Lt; Path across = "# BCBCEC0" D = "M357.3,51.4 c0.6-6.6,1-1.4,1H-8.1C-0.8,0-1.4-0.5-1.4-P-8.9C0-0.6,0.6 -1.14 -1h8.1c0.8,0,1.4,0,5,1.4,1 V51.4z "/> & Lt; Path across = "#bcbec 0" d = "m 376.7,24.4 c 0,0.6-0.6,1-1.4,1h-8.1c-0.8,0-1.4-0.5-1.4-p-8.9c0-0.6,0.6 -1.14 -1h8.1c0.8,0,1.4,0.5,1.4,1 V24.4z "/> & Lt; / G> I have tried to add the ID to the stylesheet, and I have no luck ... I tried to add a class directly to SVG.
If I add class = "places" to the path, then surely there is a roll on that element, not a group of elements. Nothing like this happened when I added this class. G ID = "WIRE_ROOM" class = "location"
I would appreciate it if someone could help me, as I have searched and trying whatever I have tried to try I am
In the case of "WIRE_ROOM" this is the different pieces of equipment, and I need to hover to highlight all 3 areas in order to show a common area for future reference. The selector is looking for that g # is WIRE_ROOM
or g.locations: hover path (I recommend using class instead of an ID). The state is triggered by the hover when the any of the child elements are folded, and then the selector hover style all Child's path You have to mention the way of the selector in particular - you can not rely on heritage - because your file sets the colors filled directly on the path, which It also takes precedence over heritage style.
Comments
Post a Comment