Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

CSS Tip! ✨ Trigonometric functions (sin, cos, etc.) are landing in CSS 🙌 Use them in animations & layouts 😯 How about these images laid out along a sine wave using scoped custom properties? img { translate: 0 calc(sin(var(--index) * 50%)); 👈 } CodePen.IO link below! 👇

229,233 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

Here's that @CodePen link! 🚀 Tap the page to toggle the layout 👇 Trigonometric functions in CSS are currently supported in Safari and Firefox. They should land in Chrome 111 🤞 What else could you use them for? 🧐

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

Not even 12 months ago, I posted this 😅 Looks like I've got some demos to make 👀

Simon Vrachliotis profil fotoğrafı
Simon Vrachliotis3 yıl önce

@CodePen Would you please stop repeatedly exploding my brain?

Surjith S M ✪ profil fotoğrafı
Surjith S M ✪3 yıl önce

@CodePen Sorry, I don’t want to learn maths again 😭

IanKDuffy profil fotoğrafı
IanKDuffy3 yıl önce

@CodePen Wait what, this wasn't even on my list of css features to wait for.

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

@CodePen Ha – A little gift from CSS 🎁 I'm kinda excited to see all the interesting ways people might use it. I've got a few ideas lined up when I can sit down with it.

Imam Syed profil fotoğrafı
Imam Syed3 yıl önce

@CodePen For me I will mostly use them for Designing loaders, and snake games. I don't see much of use case as of now.. Need to take shower to generate new ideas.💡

Chart Room Creative profil fotoğrafı
Chart Room Creative3 yıl önce

@CodePen This might be one of the coolest and most helpful tweets I've seen in a bit.

Steren profil fotoğrafı
Steren3 yıl önce

@CodePen Also nice to see `translate` instead of `transform: translate()`

Vlad profil fotoğrafı
Vlad3 yıl önce

@CodePen Now this looks something fun to play with.

Benzer Videolar