Загрузка видео...

Не удалось загрузить видео

На главную

Use CSS Grid to stack items, and visibility: hidden to hide/show spinner. This approach allows the largest item to size the button, and keeps the button text accessible

176,912 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля Wes Bos
Wes Bos1 год назад

If you like this one, here is another demo of CSS Grid stacking →

Фото профиля Marko
Marko1 год назад

grid-area: 1/-1; You don't need to name area to use grid-area. I really like your approach.

Фото профиля Wes Bos
Wes Bos1 год назад

ah good point - you can just use the implicit grid columns

Фото профиля trash
trash1 год назад

is that a… middle finger?

Фото профиля Wes Bos
Wes Bos1 год назад

as the Good Lord intended

Фото профиля mshub
mshub1 год назад

took different parts from ppl in this thread this is nice

Фото профиля Wes Bos
Wes Bos1 год назад

Big fan of this! Nice work

Фото профиля Anthony
Anthony1 год назад

We all know the real reason you made this video is so you can show off that badass mouse pointer 😂

Фото профиля Wes Bos
Wes Bos1 год назад

🖕😁🖕

Фото профиля Panta
Panta1 год назад

I love this! I should use grid to overlay elements more often. The only problem with visibility: hidden is that you can't transition between the two states using fade in/out.

Фото профиля Wes Bos
Wes Bos1 год назад

you can also add opacity to this to get in/out transitions If you want to do more allow-discrete and content-visibility will do this as well

Похожие видео