Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Problem with inline SVG and :hover

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188735
    Rasmus Jürs
    Participant

    I am trying to get :hover to work on a svg file.
    I am sure i have seen this work before. Why doesn’t it now?

    http://codepen.io/Jurs/pen/xbbgrV?editors=110

    #188738
    Paulie_D
    Member

    No…as far as I know you can’t ‘reach into’ a def/use to the underlying ‘sub-elements’ like that.

    Works with an actual inline SVG though.

    http://codepen.io/Paulie-D/pen/yyygqB

    #188756
    Paulie_D
    Member

    What you can do is create each element as a separate def and use those with a class inside a ‘grouping’ svg.

    http://codepen.io/Paulie-D/pen/WbbpOv

    #188785
    Rasmus Jürs
    Participant

    Thanks Paulie_D for 2 great answers – very usefull.

    SVG used in this manner may be lightweight and flexible. But i still find it quite a bit fiddly. Guess it’s just a matter of getting to know the syntaxes and best practises a bit better.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.