- 项目新增一个styles文件夹 , 里边新增common.wxss文件(公共的样式文件)
view{
color: turquoise;
font-size: 100px;
}

- 部分页面引入样式
wxss页面
/*
1 引入的代码是通过@import来引入
2 路径只能写相对路径
*/
@import "../../../styles/common.wxss";
wxml文件
<view >page</view>

view{
color: turquoise;
font-size: 100px;
}
wxss页面
/*
1 引入的代码是通过@import来引入
2 路径只能写相对路径
*/
@import "../../../styles/common.wxss";
wxml文件
<view >page</view>
本文标题:微信小程序 - 14.样式导入
本文链接:https://www.haomeiwen.com/subject/yaptyhtx.html
网友评论