当前位置:网站首页>Leak detection and filling (I)
Leak detection and filling (I)
2022-04-23 06:51:00 【KK should continue to work hard】
Math function
- Math.abs(): Take the absolute value
- Math.ceil(): Rounding up
- Math.floor(): Rounding down
- Math.round(): Round to the nearest whole
- Math.random(): Get one [0,1) The random number
- Math.min(): Get the minimum value in a set of numbers
- Math.max(): Get the maximum value in a set of numbers
- Math.PI: Get the pi π
- Math.sqrt(): prescribing
- Math.pow(x,y) : Calculation x Of y Power
Common regular expressions
- str.match(regexp): Retrieves the specified value within a string , Return the matching result as an array
- str.search(regexp): Retrieve the substring that meets the requirements within the string , And return the starting position of the substring in the string
- str.repalce( Replaced regular requirements , replace content ): Replace the string required by the regular , Return the replaced string
- regexp.test(str): Check whether the string matches a pattern , If it's a return true, Not return false
- regexp.exec(str): Retrieves whether there is a match in the string , If there is a match, the matching result is returned , The result is an array type , No return null
console.log('xxxssss sss ffff'.match(/xxx/g)); //['xxx']
console.log('123ssss 123 sss f123fff'.match(/\./)); //null
console.log('1234ffff'.replace(/\d+/,5678)) //5678ffff
console.log('1234ffff'.search(/2/)) //1
console.log(/\d+/.exec('1234ffff1234')) //['1234', index: 0, input: '1234ffff1234', groups: undefined]
//exec Methods and match The method is very similar , but exec Methodical RegExp Objects do not have a global search (g) There is no later content
- \d:[0-9]
- \w:[A-Za-z0-9] 、 Underline
- \D: And \d contrary
- \W: And \w contrary
- \s: Space
- \S: And \s contrary
- +: Match the previous expression 1 Times or times
- *: Match the previous expression 0 Times or times
- {n,}: At least n Time
- {n, m}:n To m Time
more :https://www.cnblogs.com/lnlvinso/p/10467941.html
marquee label
Be careful :marquee Labels have been eliminated
direction attribute :left( From right to left )、right( From left to right )、up、down
scrolldelay attribute : Time interval of each scroll
CSS Animation
- keyframe The rules
@keyframe name{
from/0%{ Corresponding css style }
25%{ Corresponding css style }
50%{ Corresponding css style }
75%{ Corresponding css style }
to/100%{ Corresponding css style }
}
- animation attribute
animation-delay: Animation execution delay time
animation-duration: Duration of animation completion
animation-direction: The execution direction of animation (normal、alternate)
animation-name: The name of the execution animation
animation-iteration-count: The number of times the animation is executed
animation-timing-function: The speed at which the animation is executed
animation-fill-code: The style when the animation is not played (none、forwards、backwards、both)
animation-play-state: Set the animation to pause or execute (paused、running)
Shorthand order :animation-name animation-duration animation-timing-funciton animation-iteration-count animation-direction
JS All the data in the are based on 64 Bit floating point data (float) To store . Basic type variables are used 8 Byte memory :8byte=64bit
Inheritable CSS attribute
1. font Series properties
2. text-indent: Indent text
3. text-align: Align text horizontally
4. line-height: Row height
5. word-spacing: Increase or decrease the space between words ( I.e. word spacing )
6. letter-spacing: Increase or decrease the space between characters ( Between characters )
7. text-transform: Control text case
8. direction: Set the writing direction of the text
9. color: text color
10. visibility: Whether elements are visible
https://www.cnblogs.com/thislbq/p/5882105.html
audio And video
audio label 、audio Object methods
attribute :
- autoplay: If the attribute appears , The audio will play as soon as it is ready
- controls: If the attribute appears , The control is displayed to the user , For example, play button
- loop: If the attribute appears , Then it starts playing again every time the audio ends
- muted: Specifies that the video output should be muted
- preload : If the attribute appears , Then the audio is loaded when the page is loaded , And get ready to play
- src: Of the audio to be played URL
Object methods :
- load(): load
- play(): Play
- pause(): Pause
- canPlayType(): Check whether the browser can play the specified type of audio
- addTextTrack(): Add a new text track to the audio
- fastSeek(): Specify the playback time
event :
abort: Triggered when the download is terminated
ended: Trigger when playback is complete
seeked: User mobile 、 Trigger when jumping to a new position
video label 、video Object methods
attribute :
stay audio Add... On the basis of the label 3 Attributes
- width: Width
- height: Height
- post: Specify the image to be displayed when the video is downloaded , Or the image displayed before the user clicks the play button
Object methods :
And audio Object methods are consistent
table label
<table border="1">
<tr>
<th>xxxxx</th>
<th>yyyyy</th>
</tr>
<tr>
<td>kkkkk</td>
<td>wwwww</td>
</tr>
</table>
table Confusing properties :
1. cellpadding: The distance between the text in the table and the border
2. cellspacing: Distance between cells
SVG And canvas The difference between
- SVG The elements drawn are independent DOM node ,canvas What is drawn is a whole canvas , therefore canvas Produced DOM Quantity ratio SVG Less
- SVG have access to css Set animation styles ,canvas Can not be
canvas label
// Open up a canvas Space
<canvas id="myCanvas"></canvas>
<script>
// Find this space and get drawing tools for it
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
// Use canvas Tools for drawing
...
</script>
https://blog.csdn.net/ff906317011/article/details/80415137
menu label
// Define menu list . Use this tag when you want to list form controls
<menu label="File">
<li></li>
<li></li>
<li></li>
</menu>
<menu label="Edit">
<li></li>
<li></li>
<li></li>
</menu>
command label
// Label definition command button , For example, radio buttons 、 Check boxes or buttons
// Only in menu The label defines command The label will be displayed , At present, only IE Support command label
<menu>
<command onclick="alert('click')"> Click on </command>
</menu>
Main attributes :
type:checkbox、command( Default )、radio
checked: Defines whether it is selected . Only used for radio or checkbox type
disabled: Definition command Is it available
radiogroup: Definition command The name of the group to which it belongs . Only if the type is radio When using .
版权声明
本文为[KK should continue to work hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230551363969.html
边栏推荐
猜你喜欢
随机推荐
Krypton binary
Wildcards and special symbols for shell scripts
js面试题:fn.call.call.call.call(fn2) 解析
自用学习笔记-连接式与非连接式访问数据库
五个路由守卫的使用
Use of C language and
往String原型上封装一个时间戳转日期的方法
欢迎使用Markdown编辑器
The difference between single quotation mark, double quotation mark and back quotation mark in shell script
启用AHCI后无法启动系统
Makefile基础、常用函数及通用Makefile
【批量更改mysql表以及表中字段对应的编码】
约瑟夫序列 线段树 O(nlogn)
Principle and characteristic analysis of triode
Palindromic Primes
Palindromic Primes
ES6面试题(参考文档)
Makefile foundation, common functions and general makefile
Vs can be compiled, but there will be a red underline to indicate the problem of undefined identifiers
2022ldu winter vacation training - program patch