Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

how do you get the size and position of an HTML element?

37,038 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von Tiger Abrodi
Tiger Abrodivor 1 Jahr

Nice. Performance stuff is really fun. One issue I had on my stock market explorer was that too many re-renders happened as data came in, especially during active hours. The goal there was to throttle and batch updates.

Profilbild von Jeff Rosen
Jeff Rosenvor 1 Jahr

Absolutely love @pmndrs react-use-measure. Implemented in a performant way and very ergonomic.

Profilbild von S
Svor 1 Jahr

Bro this is fire!!!!!!! You gotta post these in a blog or guide format. Thanks for sharing these good nuggets

Profilbild von Ozgur Ozer
Ozgur Ozervor 1 Jahr

I'm watching at 0.75x speed

Profilbild von Veronica Hines
Veronica Hinesvor 1 Jahr

Ask it nicely and hope for the best.

Profilbild von Thilak
Thilakvor 1 Jahr

This is cool

Profilbild von Starprince⚡️
Starprince⚡️vor 1 Jahr

Lovely how this is presented.

Profilbild von Bernardo Quina
Bernardo Quinavor 1 Jahr

Loving this videos. Keep them coming.

Profilbild von João Victor | Developer
João Victor | Developervor 1 Jahr

that’s truly useful

Profilbild von Pedro Batista
Pedro Batistavor 1 Jahr

If only there was already a program who implemented positioning natively...

Ähnliche Videos

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,847 Aufrufe • vor 2 Jahren