How to Animate SVG Strokes

  Рет қаралды 14,208

Coding in Public

Coding in Public

Күн бұрын

Пікірлер: 23
@ArchitectLocatelli
@ArchitectLocatelli 11 ай бұрын
If someone is having problems in Safari: at the moment Safari doesn't accept negative values for stroke-dashoffset. Thanks for the nice tutorial!
@CodinginPublic
@CodinginPublic 11 ай бұрын
Ah, yes. I believe that's still the case. I haven't ever found a solution for this. I'm assuming there are some libraries or something that can work cross-browser, but negative stroke-dashoffset do not work properly in Safari. If I remember correctly, they claim to be implementing the speck correctly, but it's still frustrating to have different experiences.
@ryder2356
@ryder2356 8 ай бұрын
Just in case it helps anyone else: In some cases you can use the pathLength attribute on any element in order to use less abstract numbers for your path animations. E.g. And then you can think of your CSS animation properties in terms of 0-100٪ Alternatively, you could use 360 for circles in order to animate using ° degrees
@sovereignlivingsoul
@sovereignlivingsoul 10 ай бұрын
i'm just getting into working with svg's making myself some logos, i am using the circle a lot, and was earlier thinking about how to cut the top off without using line or bezier curve, trying to animate a rotation is hard enough, this will help, thanks
@_vikramhegde_
@_vikramhegde_ 3 жыл бұрын
So happy to see this video, I'm participating in the same challenge and was exactly stuck at animating the svg. Thanks for the tut
@_vikramhegde_
@_vikramhegde_ 3 жыл бұрын
This might be a dumb question but I'm gonna ask it anyway. What would happen if set the animation duration(in this case animation-duration: 10s) of stroke dash offset as much the time we want it to animate, wouldn't that cut down some JS?
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Not a dumb question. Yes! That would work; but it would not allow you to make it look like ticking seconds. It would just move in one motion around in 10 seconds. So just up to you what you prefer.
@_vikramhegde_
@_vikramhegde_ 3 жыл бұрын
@@CodinginPublic ah, yes that is true. Ticking part of the animation looks much cooler
@OrlandoLopez-d8k
@OrlandoLopez-d8k Жыл бұрын
Thanks you're awesome not even the ia can tell me how this exactly work in a way that I could understand god bless you man
@CodinginPublic
@CodinginPublic Жыл бұрын
💪 take that, Artificial Intelligence! lol
@evgeniypopenko8705
@evgeniypopenko8705 5 ай бұрын
Hello! I have a question regarding first seconds of the video, where you showed your js timer project. Before the timer began to count your circle had black stroke, after the timer started the stroke became red and started to decrease its length, but the black stroke remained. How did you do this??? Did you draw addition circles?
@collinsk8754
@collinsk8754 Жыл бұрын
Great tutorial!
@CodinginPublic
@CodinginPublic Жыл бұрын
Gal you enjoyed it!
@christianmottaz7366
@christianmottaz7366 Жыл бұрын
So clear, thanks lot 😊
@CodinginPublic
@CodinginPublic Жыл бұрын
You're welcome 😊
@federicoraulmaciasaparicio1339
@federicoraulmaciasaparicio1339 2 жыл бұрын
Great video. I didn't know the $0 trick to get the total length of the circle.
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Thanks! Yeah! It’s a useful little trick for interacting with things in the DOM from the browser console.
@cooltech5441
@cooltech5441 2 жыл бұрын
Really love this video
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Great! Thanks for saying something!
@lycan2494
@lycan2494 2 жыл бұрын
THANK YOU FOR THIS VIDEO!
@CodinginPublic
@CodinginPublic 2 жыл бұрын
🙏 you’re welcome!
@jpdeseixas
@jpdeseixas 2 жыл бұрын
Great video!
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Glad you enjoyed it!
The Right Way to Animate SVG in React
15:36
CoderOne
Рет қаралды 28 М.
Make Awesome SVG Animations with CSS // 7 Useful Techniques
12:20
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Try this Multi-Path SVG Scroll Animation Technique
12:24
DesignCourse
Рет қаралды 70 М.
Learn To Build An SVG Animation With CSS
18:32
developedbyed
Рет қаралды 757 М.
Interactive web animation with SVG (DevFest 2019)
38:19
Google Developer Groups
Рет қаралды 62 М.
SVG Tutorial - Draw Any Path Animation
19:58
Roberto Matthews
Рет қаралды 32 М.
Turning SVG into CSS is magic
4:35
Matt Visiwig
Рет қаралды 28 М.
Making Future Interfaces: Inline SVG
11:16
Heydon Pickering
Рет қаралды 29 М.
SVG animation: animate an SVG icon with CSS and JavaScript
12:11
pmCodingTutorials
Рет қаралды 28 М.
Everything you need to know about the Popover API
9:06
Coding in Public
Рет қаралды 4,3 М.
SVG Circle Challenge Solutions: DrawSVG, GSAP and CSS
17:38
snorklTV
Рет қаралды 1,2 М.