当前位置:网站首页>The mobile terminal is set with fonts smaller than 12px and script labels
The mobile terminal is set with fonts smaller than 12px and script labels
2022-07-18 22:17:00 【Wangzai delicious sugar】
List of articles
Mobile terminal setting is less than 12px typeface
Because the minimum font size of the browser is 12px, The mobile terminal will use smaller fonts
transform: scale(0.7);// Make the font smaller by reducing the element
script label
script The location of the label
Put it in head in
<head>
<title> obtain DOM Elements </title>
<script src='./js/index.js'></script>
</head>
Will load all js After the document , Render the page again , The script will prevent the rendering of the page
Put it in body The tail
<body>
<div id="atag">
<p> A label </p>
</div>
<script src='./js/index.js'></script>
</body>
take script The label on the body The tail , The browser will first parse the whole HTML page , Download again js; If js Execution error , The elements in the page can also be loaded , because DOM Documents are executed from top to bottom .
defer and async The role of ---- Solve the script blocking problem
defer
<head>
<script defer src='./js/test1.js'></script>
<script defer src='./js/test2.js'></script>
</head>
script There are tags in the tag. defer, Even if written in head Location , It will not block the loading of the page , But before document Before the load is complete , Execute in script order
async
<script async src="test.js"></script>
<script async src="test2.js"></script>
Yes async The tag will load immediately , Load it first , Which one to execute first , Marked as
asyncThere is no guarantee that the scripts will be executed in the order in which they were developed .
边栏推荐
- 今天去 OPPO 面试,被问麻了
- [UCOS III source code analysis] - time slice rotation
- 你的接口多少QPS?
- SCI论文投稿流程
- VS2017\VS2019\VS2022项目多余文件(中间文件\临时文件)一键清理BAT
- Swin transformer, the best paper model of iccv 2021, finally started with video!
- 第9.1章MATLAB的程序设计
- Chapter 9.1 program design of MATLAB
- Leetcode 1309. 解码字母到整数映射(可以,一次过)
- alicloud3搭建wordpress
猜你喜欢

Publication en niveaux de gris istio: déploiement du projet de microservice bookinfo

Leetcode 1309. 解码字母到整数映射(可以,一次过)

Leetcode 1342. Number of operations to change the number to 0

SCI论文投稿流程

动态规划之4种背包问题

Timesformer: can you understand video by transformer alone? Another attack of attention mechanism!

Istio灰度發布:部署Bookinfo微服務項目

Domestic light! High score spatiotemporal representation learning model uniformer

Accessing local variables in anonymous inner classes

The author of surging issued the pressure test results
随机推荐
RPA ecosystem revealed, supporting the life source of RPA enterprises' billions of valuation
射击比赛的成绩 华为od js
MySQL 5.7.37 database download and installation tutorial (no installation required for Windows)
深入剖析多重背包问题(下篇)
[UCOS III source code analysis] - message queue
1302_ Analysis of design and implementation of coroutine in FreeRTOS
What are the main RPA manufacturers in the current mainstream
容器内部查看服务状态报错:Failed to get D-Bus connection: Operation not permitted
Summary on the use of uni cli project management uniapp compilation package version tool
华为 机考js 素数之积
Spark streaming Programming Guide
JS handwritten sort
Spark Streaming 编程指南
alicloud3搭建wordpress
Switching mode converter resource scheme of mp1655gg-z mps/ American core MOSFET
VS2017\VS2019\VS2022项目多余文件(中间文件\临时文件)一键清理BAT
Sword finger offer 10- ii Frog jumping on steps (4 solutions)
UCOS III learning notes - time slice rotation
Why is the count () method of MySQL so slow?
传输层 三次握手中性能优化