Styles in uni-app
uni-app supports the use of font icons. The usage is the same as that of ordinary web projects. Please note the following points :
<template> <view> <view> Style Learning </view> <view class="box1"> Test text <text>123</text> </view> <view class="iconfont icon-shipin"> </view> </view> </template> <script> </script> <style lang="scss"> @import url("./a.css"); // Imported external CSS file .box1{ width: 350rpx; //rpx can be used not only for boxes but also for text height: 350rpx; background: red; font-size: 50rpx; color: #FFFFFF; text{ color: pink; } } </style> Define common global styles in App.vue <style> /*Common CSS for each page */ //Global style will be overwritten by local style @import url("./static/fonts/iconfont.css"); .box1{ background: pink; } </style> SummarizeThis article ends here. I hope it can be helpful to you. I also hope you can pay more attention to more content on 123WORDPRESS.COM! You may also be interested in:
|
<<: Introduction to the use of html base tag target=_parent
>>: Solution to the problem of z-index not taking effect in CSS3
Table of contents Preface Install the graphics dr...
cause I recently started to refactor the project,...
Preface Intel's hyper-threading technology al...
Table of contents 1. First, let’s explain what Re...
For what I am going to write today, the program r...
I have just come into contact with and become fam...
Abstract: HBase comes with many operation and mai...
Step 1: Configure environment variables (my decom...
Table of contents Achieve results Complete code +...
need: The backend returns an array object, which ...
Table of contents Preface: 1. Install Docker 2. I...
1. Problem Description Today I need to check the ...
Table of contents JSON appears Json structure Jso...
Features of SSHFS: Based on FUSE (the best usersp...
Table of contents Pitfalls encountered in timesta...