H
H
HealSpirit2018-08-07 11:00:02
Layout
HealSpirit, 2018-08-07 11:00:02

Is it possible to use SVG as an interactive background?

The SVG is inserted directly into the HTML via the . As I understand it, using img and background-image it will not be possible to hang hover on SVG. Is it possible to use SVG as a container that will contain other elements (text, pictures), but so that the SVG itself can be interacted with? Example - https://codepen.io/anon/pen/wxEYBo Template - https://w3layouts.com/bhagaskara-onepage-multipurp...<svg>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alvvi, 2018-08-07
@HealSpirit

https://codepen.io/anon/pen/QBZbOO

U
unkstd, 2018-08-07
@unkstd

view the svg file in the editor -> copy all the code except for the xml tag -> paste the whole thing where you need it -> how in html you can call the elements that you want to make interactive call through classes -> well, let's go. only if you want to do things like hover effects or gradients, google is here to help. I hope there will be no difficulties
ps styles must be written inside svg through the style tag

S
svetlov97, 2018-08-07
@svetlov97

Use d3 instead of jquery. Or like anime.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question