当前位置:网站首页>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 !
边栏推荐
- mongoTemplate - distinct 使用
- 剑指 Offer 13. 机器人的运动范围 (BFS)
- MaxCompute Studio
- DevCloud加持下的青软,让教育“智”上云端
- Force deduction daily question 06.29 add two numbers
- js两个二维数组合并并去除相同项(整理)
- SSH协议学习笔记
- 回文子串的最大长度(字符串哈希+二分)
- Fill in the next right node pointer of each node [make good use of each point - > reduce the space-time complexity as much as possible]
- 小白月赛51 补题 E G F
猜你喜欢

位图的详细介绍及模拟实现
![[webdriver] upload files using AutoIT](/img/69/8c27626d515976b47f1df4831d09c8.png)
[webdriver] upload files using AutoIT

Digital twin energy system, creating a "perspective" in the low-carbon era

selenium上传文件

Premature end of script headers 或 End of script output before headers

Visio annotation, annotation location

How MySQL queries character set codes of tables

Bloom filter:

两种Controller层接口鉴权方式

Force deduction daily question 06.29 add two numbers
随机推荐
一次采集JSON解析错误的修复
基于注解和拦截器防止表单重复提交
Prevent form resubmission based on annotations and interceptors
What is the SRM system? How do I apply the SRM system?
位图的详细介绍及模拟实现
What value can SRM systems bring to the enterprise?
【目标跟踪】|stark配置 win otb
人脸识别4-百度商用方案调研
图像特征计算与表示——基于内容的图像检索
Cross border independent station language Unicode to Hebrew
Top 30 open source software
How to create a virtual image
Mongotemplate - distinct use
跨境独立站语言unicode转希伯来语
自动化软件测试 - 利用短信转发器结合Selenium读取短信验证码
阿里云不同账号新旧服务器镜像迁移数据迁移同步
第42期:MySQL 是否有必要多列分区
VB. Net read / write NFC ntag tag source code
2022春夏系列 KOREANO ESSENTIAL重塑时装生命力
设置双击运行 jar 文件