当前位置:网站首页>Wechat applet development reserve knowledge
Wechat applet development reserve knowledge
2022-06-29 17:52:00 【Aricl.】
Catalog
Two 、 Mobile terminal related knowledge
(2) Device independent pixel &css Pixels
One 、Flex Layout
(1) brief introduction
1) Flex yes Flexible Box Abbreviation , Meaning for ” Elastic layout ”, To provide maximum flexibility for box models .2) Any container can be specified as Flex Layout , Inline elements can also be used Flex Layout .3) Be careful , Set to Flex After the layout , The child element float、clear and vertical-align Property will fail .4) use Flex Elements of layout , be called Flex Containers (flex container), abbreviation ” Containers ”. All its child elements automatically become container members , be called Flex project (flex item), abbreviation ” project ”

The container has two axes by default : Horizontal spindle (main axis) And the vertical cross axis (cross axis).
Starting position of spindle ( The intersection with the border ) be called main start, The ending position is called main end.
The starting position of the cross axis is called cross start, The ending position is called cross end, Items are arranged along the main axis by default .
The spindle space occupied by a single project is called main size, The cross axis space occupied is called cross size.
(2) attribute
flex-direction
flex-wrap
flex-flow
justify-content
align-items
align-content
Flex Layout Specific Learning Websites :Flex Layout grammar tutorial | Novice tutorial
Two 、 Mobile terminal related knowledge
(1) Physical pixel
The resolution of the screen , The smallest unit that the device can control the display , Physical pixels can be regarded as corresponding pixels
(2) Device independent pixel &css Pixels
Device independent pixel ( Also called density independent pixels ), It can be considered as a point in the computer coordinate system , This point generationTable a virtual pixel that can be used and controlled by a program ( such as :CSS Pixels , It's just android In flight CSS Pixel onDon't cry ”CSS Pixels ” Instead of calling ” Device independent pixel ”), And then it's transformed into physical pixels by related systems .
(3)dpr Than &DPI&PPI
1) dpr: Device pixel ratio , Physical pixel / Device independent pixel = dpr, General with Iphon6 Of dpr Subject to dpr = 22) PPI: Number of pixels on one inch display3) DPI: At first, it refers to the number of ink points printed by the printer per unit area , The more ink dots, the clearer



(4) Mobile adaptation scheme
1)viewport adapter
reason :
a) When mobile phone manufacturers produce mobile phones, the default page width of most mobile phones is 980pxb) The actual viewport width of the mobile phone should be less than 980px, Such as : iphone6 by 375pxc) Development requirements : Need to put 980 The page is completely displayed on the phone screen without scroll bars

Implementation code :
<meta name="viewport" content="width=device-width,initial-scale=1.0">2)rem adapter
reason :
a) Too many models , Different models have different screen sizesb) demand : The content of a set of design draft has the same effect on different models , Depending on the screen size , The content of the page changes accordingly
function remRefresh() {
let clientWidth = document.documentElement.clientWidth; // Divide the screen equally 10 Share
let rem = clientWidth / 10;
document.documentElement.style.fontSize = rem + 'px';
document.body.style.fontSize = '12px'; }
window.addEventListener('pageshow', () => {
remRefresh()
})
// Function anti shake
let timeoutId;
window.addEventListener('resize', () => {
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() =>{
remRefresh()
}, 300)
})Record the learning process of wechat applet development , Welcome to study and exchange !
边栏推荐
- R language uses user-defined functions to write deep learning leaky relu activation functions and visualize leaky relu activation functions
- mysql. What is the concept of sock
- Force deduction daily question 06.29 add two numbers
- What value can SRM systems bring to the enterprise?
- Visual Studio插件CodeRush正式发布v22.1——优化调试可视化工具
- 最长异或路径(dfs+01trie)
- 基于STM32F103ZET6库函数独立看门狗(IWDG)实验
- Bloom filter:
- SRM供应商协同管理系统功能介绍
- 基于STM32F103ZET6库函数串口实验
猜你喜欢

基于注解和拦截器防止表单重复提交

最受欢迎的30款开源软件

从一个被应用商店坑了的BUG说起

selenium上传文件

Yurun multidimensional makes efforts in the charity field and bravely resists the corporate public welfare banner

DevCloud加持下的青软,让教育“智”上云端

Bottom level internal skill cultivation

Bloom filter:

迈动互联中标大家保险集团

Face recognition 4- research on Baidu commercial solutions
随机推荐
R language uses user-defined functions to write deep learning leaky relu activation functions and visualize leaky relu activation functions
DevCloud加持下的青软,让教育“智”上云端
Parental delegation mechanism
第42期:MySQL 是否有必要多列分区
How to solve MySQL 1045 error in Linux
Industry application of smart city based on GIS 3D visualization
从一个被应用商店坑了的BUG说起
lodash深拷贝使用
最长异或路径(dfs+01trie)
Does rapid software delivery really need to be at the cost of security?
上班可以做副业
Function independent watchdog (iwdg) experiment based on stm32f103zet6 Library
How to create and delete MySQL triggers
人脸识别4-百度商用方案调研
Custom handlerinterceptor interceptor for user authentication
设置双击运行 jar 文件
Partial mock of static class of phpunit operation
Face recognition 4- research on Baidu commercial solutions
The aggregate function in the epidisplay package of R language divides numerical variables into different subsets based on factor variables, and calculates the summary statistics and aggregate data. W
selenium上传文件