We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
时间:2017-01-12 11:28:43
可以使用 @import 导入外联样式表, @import 使用 外联样式表的相对路径。
/** demo.wxss **/ .container{ display:flex; background:red; } /** app.wxss **/ @import "demo.wxss"; .container{ background:yellow; }
最终的结果呢,就是
.container{ display:flex; background:yellow; }
用法跟CSS一样
<view style="color:red;font-size:24rpx; background:{{bg}}"> </view>
其中,bg是动态变化的样式。
用法跟css一样
<view class="container"> </view>
在 app.wxss 的样式是全局样式,对每一个页面都起作用。 而在 page 里面的 样式,作为局部样式,会覆盖 全局样式的样式
经过测试得到以下结果
伪劣选择器
注意: 测试中,发现 css3 的 attr()取值函数可以用,但是只能取到 class 属性的值, id, 以及其他属性的值取不到。
attr()
效果:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
零、总结
一、引入其他样式文件
可以使用 @import 导入外联样式表, @import 使用 外联样式表的相对路径。
最终的结果呢,就是
二、内联样式
用法跟CSS一样
其中,bg是动态变化的样式。
三、class样式
用法跟css一样
三、app.wxss
在 app.wxss 的样式是全局样式,对每一个页面都起作用。 而在 page 里面的 样式,作为局部样式,会覆盖 全局样式的样式
四、支持的选择器
经过测试得到以下结果
伪劣选择器
注意: 测试中,发现 css3 的
attr()
取值函数可以用,但是只能取到 class 属性的值, id, 以及其他属性的值取不到。效果:
The text was updated successfully, but these errors were encountered: