uniapp初始化CSS

/static/css/common.css

@charset "UTF-8";

/*初始化类*/
html {
	font-family: "Helvetica Neue", Helvetica, sans-serif;
	font-size: 40rpx;
}

html,
body {
	-webkit-touch-callout: none;
	-webkit-text-size-adjust: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-user-select: none;
	width: 100%;
}

body {
	line-height: 1.5;
	font-size: 28rpx;
	color: #333333;
	background-color: #F8F8F8;
	outline: 0;
}

html,
body,
header,
section,
footer,
div,
ul,
ol,
li,
img,
a,
span,
em,
del,
legend,
center,
strong,
var,
fieldset,
form,
label,
dl,
dt,
dd,
cite,
input,
hr,
time,
mark,
code,
figcaption,
figure,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
p {
	margin: 0;
	border: 0;
	padding: 0;
	font-style: normal;
}

@media only screen and (min-width: 400px) {
	html {
		font-size: 21.33333333px !important;
	}
}

@media only screen and (min-width: 414px) {
	html {
		font-size: 21px !important;
	}
}

@media only screen and (min-width: 480px) {
	html {
		font-size: 25.6px !important;
	}
}


ul,
li {
	list-style: none;
}

a {
	color: #333333;
	text-decoration: none;
	background-color: transparent;
}

textarea {
	overflow: hidden;
	resize: none;
}

button {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
   font-weight: 400;
}

h1 {
   font-size: 48rpx;
}

h2 {
   font-size: 40rpx;
}

h3 {
   font-size: 32rpx;
}

h4 {
   font-size: 28rpx;
}

h5 {
   font-size: 28rpx;
   font-weight: normal;
   color: #666666;
}

h6 {
   font-size: 28rpx;
   font-weight: normal;
   color: #666666;
}

p {
   color: #888888;
}

在App.vue引入

<style lang="scss">

@import '@/static/css/common.css'; 

</style>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Uni-app是一个跨平台的开发框架,特别适用于Vue开发人员,并且在业务逻辑相对简单的场景下非常实用。然而,对于具有100-200个页面需求的项目来说可能不太适合。\[1\] 在Uni-app中进行上线的步骤如下: 1. 使用vue-cli脚手架搭建项目,创建.vue文件来描述Vue组件,其中包含<template>、<script>和<style>三个部分,分别代表HTML、JS和CSS代码。\[2\] 2. 理解Uni-app的文件结构,其中包括components目录用于存放可复用的组件,pages目录用于存放业务页面文件,static目录用于存放静态资源,App.vue用于配置全局样式和监听应用生命周期,main.js是Vue的初始化入口文件,manifest.json用于配置应用的名称、appid、logo、版本等打包信息,pages.json用于配置页面的路由、导航条、选项卡等页面信息,package.json用于增加Uni-app扩展节点以实现自定义条件编译平台,uni.scss用于整体控制应用的风格,而vue.config.js是一个可选的配置文件。\[3\] 总结来说,Uni-app是一个实用的跨平台开发工具,特别适合Vue开发人员,并且在简单业务逻辑的场景下非常实用。在进行上线时,需要使用vue-cli脚手架搭建项目,并按照Uni-app的文件结构进行配置和开发。 #### 引用[.reference_title] - *1* [vue框架和uniapp框架区别,前端vue和uniapp哪个好用](https://blog.csdn.net/aifans_bert/article/details/126848883)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [Uni-app中的Vue](https://blog.csdn.net/qq_41525746/article/details/107172064)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值