jakob zabala Posted April 2, 2021 Share Posted April 2, 2021 I am try bring an SVG element to the front of the dom within the timeline. At the moment all the elements animate in the order of the html. Is there a way to bring elements to to the front? If you uncomment the the .fromTo tween in the middle of the timeline it will become clearer what my issue is. The white drawSVG path doesn't come to the front after setting the ZIndex. Thanks See the Pen OJWpmrv?editors=1010 by jaykobz (@jaykobz) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted April 2, 2021 Share Posted April 2, 2021 Sorry to say z-index isn't going to work on SVG child elements. You'll need to set the order when you create it with the last child being on top of the stack. You could use two separate SVGs and use z-index as needed. Make sense? Happy tweening. 1 Link to comment Share on other sites More sharing options...
jakob zabala Posted April 2, 2021 Author Share Posted April 2, 2021 aaa yes! i just didn't want to add multiple similar svgs if I will be re-using elements, but not the worst, thanks for the info Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now