当前位置:网站首页>Leak detection and filling (I)

Leak detection and filling (I)

2022-04-23 06:51:00 KK should continue to work hard

Math function

  1. Math.abs(): Take the absolute value
  2. Math.ceil(): Rounding up
  3. Math.floor(): Rounding down
  4. Math.round(): Round to the nearest whole
  5. Math.random(): Get one [0,1) The random number
  6. Math.min(): Get the minimum value in a set of numbers
  7. Math.max(): Get the maximum value in a set of numbers
  8. Math.PI: Get the pi π
  9. Math.sqrt(): prescribing
  10. Math.pow(x,y) : Calculation x Of y Power

Common regular expressions

  • Regular expression methods
  1. str.match(regexp): Retrieves the specified value within a string , Return the matching result as an array
  2. str.search(regexp): Retrieve the substring that meets the requirements within the string , And return the starting position of the substring in the string
  3. str.repalce( Replaced regular requirements , replace content ): Replace the string required by the regular , Return the replaced string
  4. regexp.test(str): Check whether the string matches a pattern , If it's a return true, Not return false
  5. 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 
  • Common rules
  1. \d:[0-9]
  2. \w:[A-Za-z0-9] 、 Underline
  3. \D: And \d contrary
  4. \W: And \w contrary
  5. \s: Space
  6. \S: And \s contrary
  7. +: Match the previous expression 1 Times or times
  8. *: Match the previous expression 0 Times or times
  9. {n,}: At least n Time
  10. {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

  1. 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 }
}
  1. 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 :

  1. autoplay: If the attribute appears , The audio will play as soon as it is ready
  2. controls: If the attribute appears , The control is displayed to the user , For example, play button
  3. loop: If the attribute appears , Then it starts playing again every time the audio ends
  4. muted: Specifies that the video output should be muted
  5. preload : If the attribute appears , Then the audio is loaded when the page is loaded , And get ready to play
  6. src: Of the audio to be played URL

Object methods :

  1. load(): load
  2. play(): Play
  3. pause(): Pause
  4. canPlayType(): Check whether the browser can play the specified type of audio
  5. addTextTrack(): Add a new text track to the audio
  6. 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

  1. width: Width
  2. height: Height
  3. 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

  1. SVG The elements drawn are independent DOM node ,canvas What is drawn is a whole canvas , therefore canvas Produced DOM Quantity ratio SVG Less
  2. 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