Skip to content
Weapp-vite
Search
⌘
Ctrl
K
Main Navigation
指引
教程
配置
Wevu
Wevu API
Wpi
周边包
AI
社区
迁移
博客
Appearance
Menu
Return to top
本页目录
Are you an LLM? You can read better optimized documentation at /handbook/sfc/style.md for this page in Markdown format
样式:wxss / scoped / 预处理器
Copy page
本章你会学到什么
在 SFC 里写样式,最终如何落到 WXSS
scoped、选择器限制、样式顺序等常见坑
你要记住的 3 件事
小程序选择器能力弱于 Web:写样式要更克制。
scoped
不是浏览器的 shadow dom:它是编译期选择器改写。
样式顺序与注入策略会影响覆盖:团队最好统一主要预处理器(例如统一 scss)。
相关链接
wxss 细节与坑位:
/guide/wxss