Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Currently building an interactive landing page for a portfolio site. I'm trying to animate the stroke-width of an SVG based on the mouse position on the x-axis, using jQuery. I have a basic/core understanding of HTML, CSS, jQuery and SVGs, but I'm struggling to work out how to achieve this effect.

The problem I'm having is that I need the stroke to remain on the inside of the path, so that it doesn't extrude past the edge of the screen. After some research I can see that the stroke-alignment property has been added to the SVG spec, but has yet to be implemented https://stackoverflow.com/a/28787545.

Here is a crude example of the desired effect on a PDF file: https://pasteboard.co/JJ93yOn.gif

What would be the best way to achieve this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
272 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...