Highlight SVG group elements like <rect> with CSS / Javascript /jQuery -


i trying highlight svg element on hover glowing element.

i know can use using filters.

but, wonder there easier way achieve using css or javascript or jquery

i know following code works on chrome:

-webkit-svg-shadow: 0 0 7px red; 

but cannot rely on code doesnt work on safari or firefox.

any ideas/suggestions?

something might work, use css-box shadow on svg element:hover.

fiddle

html

<svg height=100 width=100 xmlns="http://www.w3.org/2000/svg"  xmlns:xlink="http://www.w3.org/1999/xlink"></svg> 

css

svg{     background-color:#ccc; } svg:hover{     box-shadow: 0 0 20px yellow; } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -