当前位置:网站首页>VW VH adaptation of mobile terminal
VW VH adaptation of mobile terminal
2022-06-25 10:53:00 【Stranger & love sorrow】
What is? vw vh
It belongs to a new mobile terminal layout configuration , Function and rem similar
vw The maximum width of the viewport ,1vw Equal to onepercent of the viewport width
vh Maximum height of the viewport ,1vh Equal to onepercent of the viewport height
How to automatically adapt vw vh
Installation dependency
npm install postcss-px-to-viewport -D
modify .postcssrc.js
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
plugins: {
autoprefixer: {
overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8']
},
'postcss-px-to-viewport': {
viewportWidth: 375, // The width of the window , It corresponds to the width of our design , It's usually 750
unitPrecision: 3, // Appoint `px` The number of decimal places to convert to the value of the window unit ( A lot of times it's not divisible )
viewportUnit: 'vw', // Specifies the window units to convert to , It is recommended to use vw
selectorBlackList: ['.ignore', '.hairlines'], // Specifies a class that is not converted to a window unit , You can customize , You can add unlimited , It is recommended to define one or two common class names
minPixelValue: 1, // Less than or equal to `1px` Do not convert to window units , You can also set it to the value you want
mediaQuery: false // Allow conversion in media queries `px`
}
}
}
matters needing attention
In this project , Can not have rem Adaptive data , Or they will be replaced
边栏推荐
- Performance memory
- Task03 probability theory
- 输出式阅读法:把学到的知识用起来
- Is it safe to open an account through mobile phone if you open an account through stock speculation? Who knows?
- Oracle彻底卸载的完整步骤
- 【文件包含漏洞-04】经典面试题:已知某网站仅存在本地文件包含漏洞时,如何GetShell?
- OODA working method
- IdentityServer4 定义概念
- Google Earth Engine(GEE)——evaluate实现一键批量下载研究区内的所有单张影像(上海市部分区域)
- Checking whether the double value is an integer - Swift - checking if a double value is an integer - swift
猜你喜欢

The real difference between i++ and ++i

After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-7

Task03 probability theory

Houdini图文笔记:Your driver settings have been set to force 4x Antialiasing in OpenGL applications问题的解决

之前字符串反转的题目
![[image fusion] image fusion based on morphological analysis and sparse representation with matlab code](/img/ae/027fc1a3ce40b35090531370022c92.png)
[image fusion] image fusion based on morphological analysis and sparse representation with matlab code

我的作文题目是——《我的区长父亲》

A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students

TASK03|概率论

Chinese translation of IMA Lazarus' the new giant, the goddess of Liberty
随机推荐
【RPC】I/O模型——BIO、NIO、AIO及NIO的Rector模式
Use of Siemens plcs7-200 (I) -- Introduction to development environment and configuration software
国信证券证券账户开户安全吗
Growth: how to think deeply and learn
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-7
Deep understanding of JVM - JVM memory model
Kotlin arrays and collections (1) {create arrays, use arrays, use for in loops to traverse arrays, use array indexes, and multi-dimensional arrays}
Flutter adds event listening | subscription
Cdn+cos ultra detailed steps for drawing bed construction
XSS攻击
FPGA基于VGA显示字符及图片
OpenCV学习(二)---树莓派上安装opencv
The left sliding menu +menu item icon is grayed out
Five types of questions about network planning
June 24, 2022: golang multiple choice question, what does the following golang code output? A:1; B:3; C:4; D: Compilation failed. package main import ( “fmt“ ) func mai
Macro application connector\
有关计网的五种类型题
tokenizers>=0.11.1,!= 0.11.3,<0.13 is required for a normal functioning of this module,
Floating window --- create a system floating window (can be dragged)
性能之网络篇