短评 · ·

X 归档 2021-12-23

1 条动态 · 图 0 · 视频 1
🤩 Another cool feature added in Tailwind CSS v3.0 is native support for smooth scrolling and scroll margin!

Add `scroll-smooth` for smooth scrolling, and use utilities like `scroll-mt-12` to control the scroll offset 💅

https://tailwindcss.com/docs/scroll-behavior
🤩 Tailwind CSS v3.0 新增的又一个酷炫特性:原生支持平滑滚动和 scroll margin!

加上 `scroll-smooth` 实现平滑滚动,再用 `scroll-mt-12` 这类工具类控制滚动偏移 💅