当前位置:网站首页>Leak detection and vacancy filling (V)
Leak detection and vacancy filling (V)
2022-04-23 06:51:00 【KK should continue to work hard】
Leak filling ( 5、 ... and )
box-sizing attribute
Applicable scenario :
.wrapper{
width: 300px;
height: 200px;
}
.wrapper div{
float: left;
width: 50%;
padding: 10px;
// Two boxes float ,width Each half , But because of padding, The width of the child container has exceeded half of that of the parent container , At this time, the sub container will fold
//box-sizing: content-box;
// Use border-box Attribute auto adjustment
box-sizing: border-box;
}
<div class="wrapper">
<div>A</div>
<div>B</div>
</div>
- content-box( The default value is ): Set the width of a box model / Height , If this box has border、padding, It will not affect the set width / Height ;
- border-box: Set the width of a box model / Height , If this box has border、padding, Now the width and height of this box is : Set the width / Height -border-padding;
- inherit: Inheriting from the parent element box-sizing
DOM Tree And render Tree The difference between
html After parsing, generate DOM Tree, In the build DOM Tree Render when render Tree, The renderer calculates node style information . The parent node is created before the child node render Tree, When destroying, the child node is destroyed before the parent node render Tree.
If the element is set to display: none Property does not create the corresponding render Tree, however visibility:hidden Will create
DOM Tree And html Elements correspond one to one ,render Tree No, header And hidden elements
Boxing and UnBoxing
- Packing :js The basic data type in is not an object , There is no way , But for example, string can also call many corresponding string methods , This is because js Internally, the basic data type will be converted to the corresponding reference data type , Call the corresponding method on the instance , Then automatically destroy the object
- Unpacking : Convert the reference type object to the corresponding value type object , adopt valueOf()、toString() How to unpack
- When will unpacking and packing conversion be carried out : Basic data type data and reference data type data will be boxed if they need to be converted / Unpacking operation , for example : Double equal sign 、 All in one
Comparison operator (==)
The comparison operator performs automatic type conversion
- Comparison between object type and basic data type , The object type is converted to the basic data type ( Unpacking ,valueOf) After object conversion, it is still an object , After array conversion, it is still an array ;
- Compare string type with number type , String will be converted to numeric type ;
- Boolean types are compared to other types , Boolean types are converted to numeric types 0、1 Compare with other types ;
- null==undefined, In addition, they are no longer equal to any basic data type
- NaN == NaN by false
All equal to (===)
Existing comparative value ( Address ) And compare types
- If the types are different ,false
- null === null by true
- undefined === undefined by true
- Reference data types compare values, addresses, and types
- true === true by true
- false === false by true
- Number Type comparison value , If the value is NaN,NaN Not equal to any value
- Strings compare both values and types
parseInt
Parse the string according to the format at the beginning of the string , The parsing rules are as follows :
- With “0x” start , Parse the rest into hexadecimal integers ;
- With “0” start , Parse the rest into octal or hexadecimal integers ;
- With “1-9” start , Resolve to decimal integer
XSS
- Cross-site scripting attacks , Exploit the loopholes left by web development to insert script Code and execute to attack ;
- XSS The attack requires the server to protect the interface
content-type
The content type actually returned by the client
- application/x-www-form-urlencoded:post The most common way to submit , With key1=value1&key2=value2 The format of ;
- multipart/form-data:post Data submission method ,form Form submission ectyped Definition ,form Upload must be changed to this value ;
- application/json: The format of sending data to the background must be json character string , When passing complex data , Use the data as JSON.stringify() Convert to string , It must trigger cors Pre inspection ;
- application/xml and text/xml:xml Formatted data
版权声明
本文为[KK should continue to work hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230551363774.html
边栏推荐
- freeCodeCamp----arithmetic_arranger练习
- Node的文件系统及Buffer概述
- oninput 一个函数达到控制多个oninput的效果(将本输入框的内容作为参数)【很实用,很实用】
- js面试题:fn.call.call.call.call(fn2) 解析
- ASP.NET CORE JWT认证
- 查漏补缺(六)
- excel里有文字的数字怎么从小到大排序,而不是首数字排序
- Header内置对象
- China creates vast research infrastructure to support ambitious climate goals
- Database programming of node
猜你喜欢
随机推荐
Mysql中的索引与视图
.NET Standard详解
TypeScript(上)
启用AHCI后无法启动系统
Router对象、Route对象、声明式导航、编程式导航
ASP.NET CORE3.1 Identity注册用户后登录失败的解决方案
.Net Core 下使用 Quartz —— 【3】作业和触发器之作业传参
如何使用input表单向服务发送(占用较小)图片文件(body传输)?涉及到FileReader内置对象
查漏补缺(一)
freeCodeCamp----budget & category 练习
Promise(二)
Navicat 连接 oracle library is not loaded的解决方法
.Net Core 下使用 Quartz —— 【1】快速开始
.NET类型转移
Set与Map
Arm common assembly instructions
New formdata() when importing files
百度地图基础案例
Node数据流
百度地图3D旋转和倾斜角度的调整









