正在加载视频...

视频加载失败

Man I love this cool effect with CSS Conic gradients!

163,490 次观看 • 1 年前 •via X (Twitter)

10 条评论

Wes Bos 的头像
Wes Bos1 年前

Code for this button effect here. Should few good replies pointing out how to do it without the extra element too.

Ana Tudor 🐯🖤🌻 的头像
Ana Tudor 🐯🖤🌻1 年前

No need for any nesting/ pseudos. Make the `conic-gradient()` relative to `border-box` and restrict main button background layer to `padding-box`. Here's something similar for `img` elements + some added SVG `filter` enhancements (glow, rounding, tail...)

Jacob Wolf 🐝 的头像
Jacob Wolf 🐝1 年前

Y’all need to get one of Apple’s frontend developers on the pod. They do so much innovative stuff on their product site.

Wes Bos 的头像
Wes Bos1 年前

Agreed! Very hard to get Apple employees on the podcast. We had Jen Simmons, but that took a bit. One more coming up shortly as well

Greg Robson on https://bsky.app/profile/gregrobson 的头像
Greg Robson on https://bsky.app/profile/gregrobson1 年前

Me when I see the effect: "Ooooh, would be better if slowed on the ends" @wesbos at the end of the video: oh, and if you wanted to slow it down on the ends of the button... Nice demo!👍

Wes Bos 的头像
Wes Bos1 年前

Just need a way to translate the aspect ratio of the button to a timing function. Could probably get away with a generic one though

Artem Kharchuk 的头像
Artem Kharchuk1 年前

I remember when I first created this effect; it was unforgettable 😂 In my opinion, this is one of the most beautiful effects for special buttons.

Ekpono 的头像
Ekpono1 年前

CSS is packed with many properties, really hard to keep up

Fre Timmerman 的头像
Fre Timmerman1 年前

I believe it the convention is to select pseudo-elements with double colon ::before ? (To distinguish them from pseudo-classes which are selected with : one colon ) However apparently browsers also accept single-colon notation :before so 🤷🏻‍♂️

Wes Bos 的头像
Wes Bos1 年前

Yeah there is no difference in the selectors, but you are right

相关视频

MAN I LOVE CUTE GIRLS IN SUPER COOL KNIGHT ARMOR
1:48

Sensitive content

MAN I LOVE CUTE GIRLS IN SUPER COOL KNIGHT ARMOR

delty

1,413,492 次观看 • 1 年前