Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Really cool CSS gradient border effect I recreated after seeing it on the warp website. Demo: Code:

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

10 Yorum

Geoffrey Shepard profil fotoğrafı
Geoffrey Shepard3 yıl önce

Woah, never seen anything like it. Cool trick, a little distracting, but has a use case somewhere

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

Ha def could be distracting. Use case is to make you say "Woah, never seen anything like it" 😀

John Hooks profil fotoğrafı
John Hooks3 yıl önce

Thanks for breaking that down. It’s a really cool effect.

Wei Su profil fotoğrafı
Wei Su3 yıl önce

Thank u Wes, I’m gonna steal the green one.

Karol Głomski ⌨ 🐍 profil fotoğrafı
Karol Głomski ⌨ 🐍3 yıl önce

how do I save a tweet for later?

Hagai Bloch profil fotoğrafı
Hagai Bloch3 yıl önce

Damn, that's cool, now I will put it anywhere I can unnecessarily until my product manager yell at me.

Lucas Nunes | Lukinh4Z profil fotoğrafı
Lucas Nunes | Lukinh4Z3 yıl önce

@Reimanzzzzzzzz

Tyler Freedman profil fotoğrafı
Tyler Freedman3 yıl önce

Is there a way to make this effect happen in intervals by itself? I'm fairly new to CSS

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

Yep, you would use a setInterval to run code every 5 seconds, and each time that runs you toggle a class of “start”

Odii profil fotoğrafı
Odii3 yıl önce

Amazing 🔥 Trust the full version is on YouTube now, need to try this!

Benzer Videolar

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,739 görüntüleme • 2 yıl önce