局部样式会覆盖全局样式
全局样式写在App.vue
字体图标将资源放在static中
路径改为绝对路径 格式为 ~@/path
使用文字图片
<view class="iconfont icon-tupian">
</view>
使用scss
<style lang="scss">
@import url("./a.css");
.box1{
width: 375rpx;
height: 375rpx;
background-color: #0000FF;
font-size: 30rpx;
color: $uni-color-error;//使用uni.scss
text{
color:#4CD964;
}
}
</style>