Loading...
Loading...
Compare original and translation side by side
TeamCreateTeamCreate| Name | Width | Tailwind | Use Case |
|---|---|---|---|
| xs | 0-479px | default | Mobile portrait |
| sm | 480-719px | | Mobile landscape |
| md | 720-919px | | Tablet portrait |
| lg | 920-1199px | | Tablet landscape |
| xl | 1200px+ | | Desktop |
| 名称 | 宽度范围 | Tailwind 前缀 | 使用场景 |
|---|---|---|---|
| xs | 0-479px | default | 手机竖屏 |
| sm | 480-719px | | 手机横屏 |
| md | 720-919px | | 平板竖屏 |
| lg | 920-1199px | | 平板横屏 |
| xl | 1200px+ | | 桌面端 |
<div className="
grid grid-cols-1 /* mobile: 1 column */
sm:grid-cols-2 /* sm: 2 columns */
lg:grid-cols-3 /* lg: 3 columns */
gap-4 sm:gap-6 lg:gap-8
"><div className="
grid grid-cols-1 /* 移动端:1列 */
sm:grid-cols-2 /* sm断点:2列 */
lg:grid-cols-3 /* lg断点:3列 */
gap-4 sm:gap-6 lg:gap-8
"><div className="@container">
<div className="@md:flex @md:gap-4">
<div className="@md:w-1/2">Left</div>
<div className="@md:w-1/2">Right</div>
</div>
</div><div className="@container">
<div className="@md:flex @md:gap-4">
<div className="@md:w-1/2">左侧</div>
<div className="@md:w-1/2">右侧</div>
</div>
</div>.hero-title {
font-size: clamp(2rem, 5vw + 1rem, 4rem);
}.hero-title {
font-size: clamp(2rem, 5vw + 1rem, 4rem);
}<div className="block sm:hidden">Mobile only</div>
<div className="hidden lg:block">Desktop only</div><div className="block sm:hidden">仅移动端显示</div>
<div className="hidden lg:block">仅桌面端显示</div>@theme {
--breakpoint-sm: 480px;
--breakpoint-md: 720px;
--breakpoint-lg: 920px;
--breakpoint-xl: 1200px;
}@theme {
--breakpoint-sm: 480px;
--breakpoint-md: 720px;
--breakpoint-lg: 920px;
--breakpoint-xl: 1200px;
}[ ] Mobile-first approach (start smallest)
[ ] Container queries for complex layouts
[ ] Fluid typography with clamp()
[ ] Touch targets 44x44px on mobile
[ ] No horizontal scroll on mobile[ ] 采用移动优先的开发方式(从最小尺寸开始)
[ ] 为复杂布局使用容器查询
[ ] 使用clamp()实现流体排版
[ ] 移动端触摸目标尺寸为44x44px
[ ] 移动端无横向滚动