RUVIDEO
Поделитесь видео 🙏

CSS Trigonometry is surprisingly useful

I'm working on a course that covers Sass in real world situations, and a lot more: https://beyondcss.dev

Trigonometry is here in CSS with sin(), cos(), and tan(), as well as a few others. I kept seeing a lot of people excited for these, but I didn't really get why for a long time, but I found a good use case for sin() and cos() and wanted to share it in this video.

I also take a look at how we can step things up with a Sass/SCSS loop and a little bit more than that as well.

? Links
✅ The finished code - first example: https://codepen.io/kevinpowell/pen/qBMQJVr?editors=1100
✅ The finished code - second example: https://codepen.io/kevinpowell/pen/MWqXwyE/5a86eb4081548272d1bcf3eab23de5dehttps://codepen.io/kevinpowell/pen/MWqXwyE/5a86eb4081548272d1bcf3eab23de5de
✅ A great breakdown of the basics of the trig functions on Codrops: https://tympanus.net/codrops/2021/06/01/trigonometry-in-css-and-javascript-introduction-to-trigonometry/
✅ More examples from web.dev: https://web.dev/css-trig-functions/

⌚ Timestamps
00:00 - Introduction
00:52 - A use case for sin() and cos() in CSS
01:25 - What we are starting with
02:00 - Basic styling for the outer circles
03:20 - Getting the outer circles centered
04:17 - Positioning the outer circles with magic numbers
05:30 - Positioning with sin() and cos()
08:04 - Improving things with custom properties
10:40 - Speeding things up with a Sass/SCSS loop
15:09 - Using sin() and cos() for animation delays

#css

--

Come hang out with other dev's in my Discord Community
? https://discord.gg/nTYCvrK

Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter

Come hang out with me live every Monday on Twitch!
? https://www.twitch.tv/kevinpowellcss

---

Help support my channel
?? Get a course: https://www.kevinpowell.co/courses
? Buy a shirt: https://teespring.com/stores/making-the-internet-awesome
? Support me on Patreon: https://www.patreon.com/kevinpowell

---

My editor: VS Code - https://code.visualstudio.com/

---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Twitter: https://twitter.com/KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell

---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «CSS Trigonometry is surprisingly useful», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.