Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

CSS placeholder shimmer effect ✨ – overlay a placeholder element – set aria-hidden and pointer-events: none – show when :placeholder-shown – visually hide actual :placeholder – use mask for the border – background-clip for the text 🤙 Check the debug 👇🎬

152,812 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

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

little text shimmer was used here 👇 and there was a request for how to do it 🤙 you could use :placeholder and @​property too. gets a little tricky with browser inconsistency though 🥲

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

if you're interested in learning more about building things like this and other awesome UI on the web... first issue goes out this week 🤙 (support has been awesome btw, thank you people 🙏)

Gustav Ekerot profil fotoğrafı
Gustav Ekerot1 yıl önce

jhey you’re like 83% of my bookmarks

Joe Attardi profil fotoğrafı
Joe Attardi1 yıl önce

That is awesome! It's not as cool as yours but I did something similar a while back ,a button with a shine effect on hover:

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

Like that with the twist 🤙 Did this one with a link to play with that shine bar effect 🤓

Ayan Patel profil fotoğrafı
Ayan Patel1 yıl önce

It's look Clean 🗿

Dennis Plucinik profil fotoğrafı
Dennis Plucinik1 yıl önce

@chrispian Very clean

Adnan Muttaqin profil fotoğrafı
Adnan Muttaqin1 yıl önce

That is awesome!

Hüseyin profil fotoğrafı
Hüseyin1 yıl önce

CSS can be pure art sometimes

Gemma Black profil fotoğrafı
Gemma Black1 yıl önce

Just with CSS?! Nice!

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