短评 · ·

X 归档 2022-03-19

6 条动态 · 图 1 · 视频 1
You’re unable to view this Post because this account owner limits who can view their Posts. {learnmore}
由于该账号所有者限制了谁可以查看其帖子,你无法查看这条帖子。{learnmore}
What is JavaScript missing. A thread: 🧵
JavaScript 还缺什么。一个串:🧵
CSS Anchored Positioning: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/CSSAnchoredPositioning/explainer.md

If you've ever used Popper.js, this will be of interest to you. Imagine positioning top layer popovers with pure CSS! 🤩
CSS Anchored Positioning:https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/CSSAnchoredPositioning/explainer.md

如果你用过 Popper.js,这会让你感兴趣。想象一下用纯 CSS 定位顶层 popover!🤩
CSS Tip 💡

Use a dynamic line separator that changes from horizontal to vertical depending on flex-direction. No need for width or height. Just a stretched CSS border!

Details: https://ishadeed.com/article/flexbox-separator/
CSS 小技巧 💡

使用一条动态分隔线,根据 flex-direction 在水平与垂直之间切换。不需要设置宽高,只要一条被拉伸的 CSS border 就行!

详情:https://ishadeed.com/article/flexbox-separator/
@shadeed9 的配图 1/1
CSS Anchored Positioning: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/CSSAnchoredPositioning/explainer.md

If you've ever used Popper.js, this will be of interest to you. Imagine positioning top layer popovers with pure CSS! 🤩
CSS Anchored Positioning:https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/CSSAnchoredPositioning/explainer.md

如果你用过 Popper.js,这会让你感兴趣。想象一下用纯 CSS 定位顶层 popover!🤩
We can take this further and use CSS container queries to toggle between flex-direction: row or column based on the parent width!

Demo (Chrome canary): https://codepen.io/shadeed/pen/vYpGjZY?editors=1100 https://t.co/66hxhmbCvt
我们还能更进一步,用 CSS container queries 根据父元素宽度在 flex-direction: row 和 column 之间切换!

演示(Chrome canary): https://t.co/66hxhmbCvt