MindMap Gallery HTML5 related knowledge summary summary mind map
What is HTML5? How to study? HTML5 is a language description method for structuring web content. HTML5 is the next generation standard of the Internet and a language method for constructing and presenting Internet content. It is considered to be one of the core technologies of the Internet. HTML was created in 1990, and HTML4 became an Internet standard in 1997 and is widely used in the development of Internet applications. The following map summarizes HTML5 related knowledge for your reference and study.
Edited at 2018-12-19 12:05:18El cáncer de pulmón es un tumor maligno que se origina en la mucosa bronquial o las glándulas de los pulmones. Es uno de los tumores malignos con mayor morbilidad y mortalidad y mayor amenaza para la salud y la vida humana.
La diabetes es una enfermedad crónica con hiperglucemia como signo principal. Es causada principalmente por una disminución en la secreción de insulina causada por una disfunción de las células de los islotes pancreáticos, o porque el cuerpo es insensible a la acción de la insulina (es decir, resistencia a la insulina), o ambas cosas. la glucosa en la sangre es ineficaz para ser utilizada y almacenada.
El sistema digestivo es uno de los nueve sistemas principales del cuerpo humano y es el principal responsable de la ingesta, digestión, absorción y excreción de los alimentos. Consta de dos partes principales: el tracto digestivo y las glándulas digestivas.
El cáncer de pulmón es un tumor maligno que se origina en la mucosa bronquial o las glándulas de los pulmones. Es uno de los tumores malignos con mayor morbilidad y mortalidad y mayor amenaza para la salud y la vida humana.
La diabetes es una enfermedad crónica con hiperglucemia como signo principal. Es causada principalmente por una disminución en la secreción de insulina causada por una disfunción de las células de los islotes pancreáticos, o porque el cuerpo es insensible a la acción de la insulina (es decir, resistencia a la insulina), o ambas cosas. la glucosa en la sangre es ineficaz para ser utilizada y almacenada.
El sistema digestivo es uno de los nueve sistemas principales del cuerpo humano y es el principal responsable de la ingesta, digestión, absorción y excreción de los alimentos. Consta de dos partes principales: el tracto digestivo y las glándulas digestivas.
HTML5
<body>URL content
body properties:
bgcolor: background color Background: background image Text: font color onload: called when loading
horizontal line
<hr>
Font operations
Bold font
<b>
font italic
<i>
Underline
<u>
strikethrough
<del>
font
<font>: Color: font color Size: 1~7 font size
<mark>Highlight</mark>
title tag
<h1>~<h6> Make the font bold, larger, and on its own line
paragraph tags
<p> Separate between paragraphs
newline
<br>
space
Hyperlink
ordinary link
<a href="address">link name</a>
anchor link
First define the location tag: <a name="ding"></a> Then use a hyperlink to jump to a predefined location: <a href="#ding">Back to top</a>
functional connection
QQ pop-up window: What is called is Tencent’s remote chat interface <a href="tencent://message/?uin=10001&Menu=yes"> <img border="0" src="http://wpa.qq.com/pa?p=1:615050000:10"/></a>
Image tags
<img src="Picture resource path" width="Width of the picture (px pixels or %)" title="Hover prompt text" alt="Prompt file for failed loading" border="Border 1 Yes 0 No" />
list
Ordered list:
<ol type="value"> <li>Banana</li> <li>Potato</li> <li>Yali</li> </ol>
Unordered list:
<ul type="value"> <li>Beijing</li> <li>Shanghai</li> <li>Guangzhou</li> </ul>
Quick creation
ul>li*4 tab key
sheet
table properties
border: table border, the value is int type, the larger the value, the thicker the line, 0 means none bordercolor: color of table frame cellspacing: the distance between cells width: width of the table, pixels or percentages height: height of the table, pixels or percentage bgcolor: background color of table or cell (applicable to table, tr, td) background: background image
Quick creation
table>tr*2>td*3
<table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> </table>
tr represents row td represents column
Merge Cells
colspan: merge horizontally with parallel (horizontal/left-right direction) rowspan: merge rows (vertical direction/up and down direction) merge vertically Note: Merge means multiple items become one, so any excess should be deleted!
form
<form></form>
form attributes:
- action: the destination of form submission - method: method of form submission get plain text (default)/post cipher text - enctype: encoding method (there are special elements in the form: only used when uploading images) onsubmit: event submission
input
<input type="x" name="y" placeholder="" disabled="disabled"> type: type name: name of the input box placeholder;prompt input box disabled: disabled
The value of type: text: text input box (default value) password: password input box checkbox: check box/multi-select box <-checked selects the selected element radio: radio button submit: Submit button (you can use value to override the default button name) reset: reset button (you can use value to override the default button name) button: button -In form: equivalent to submit button - Outside the form: ordinary button color: color palette date:calendar month:monthly calendar week weekly calendar number:numeric field -min minimum value -max maximum value -step jumps by multiples of input range: slide search search box
<select> <option>Drop-down menu</option> ... </select>
scroll bar
<progress></progress>
Lenovo input box
Be consistent
Expandable content area
frame
References to other pages (with hyperlinks)
<a href="Open page or picture" target="xy">Chapter 1</a> <br /><br /> <a href="Open page or picture" target="xy">Chapter 2</a> <br /><br /> <a href="Open page or picture" target="xy">Chapter 3</a> <br /><br /> <iframe name="xy" width="400px" height="300px"></iframe>
target: The target of opening the web page is the xy position
media label
<video>video
<audio>Music
Show playback controls
controls
Autoplay
autoplay
automatic cycle
loop
path
src
structure tag div
Derive many div child elements based on div, and they can be used as divs Each child element has its own name to complete the "semantic" description of the div. Semanticization: similar to "knowing the meaning by seeing the name" in the specification of Java variable naming
<section>
content area in web page
<article>
article
<aside>
Content outside the article
<hgroup>
Combination of content and title
<nav>
navigation
<figure>
Pictures and texts
<header>
Header of web page
<footer>
bottom of page
clear float:both sides
clear:both;
<style>css style
Use three methods:
inline styles
written inside the opening tag
<p style="color:red;">HTML</p>
internal style
Written between </head><body>
<style></style>
external style sheet
Create a .css file and write in it
Definition:<link href="css/01.css" rel="stylesheet"/>
css priority
The principle of proximity
Selector
element selector
Format:h2{}
Use the tag name as the target of modification
class selector class
Format: .class name{}
Further filter the element selector
ID selector id
Format: #id name{}
Taking class selectors one step further
selector group
Format:h1,h2,h3{}
derived selector
Descendant selector (select all)
Format:div p{}
Descendant selector(selector)
Format:div>p{}
Pseudo class selector
Not clicked
Format: a:link{}
After clicking
Format:a:visited{}
hover
Format: a:hover{}
Click and hold
Format:a:active{}
The four pseudo-classes must be in a certain order, otherwise they will be invalid lvha
background
background color
background-color:red;
Background picture
background-image:url(img/1.jpg);
background tiling
By default, the background image is "tiled" on the x and y axes. Use background-repeat to control how tiling works:
repeat: Default value, tiling in x and y directions
repeat-x: tiling in x direction
repeat-y: tiling in the y direction
no-repeat: no tiling
background pan
background scroll
background-attachment: scroll; background scroll (default value)
background-attachment: fixed; The background does not move
background size
contain: Zoom to the size of the background area (the background image is fully displayed) cover: Scale to completely cover the background area (leave no blank space)
background position
background-origin:
border-box;
padding-box: (default)
content-box:
background crop
background-clip:
border-box;
padding-box: (default)
content-box:
Cut on four sides
frame
Four sides, set at the same time: border:3px solid red;
Text overflow handling
auto: Adaptive, if it exceeds the limit, scroll bars will be added, otherwise no scroll bars will be added.
hidden: hidden if exceeded
RGB color
http://tool.oschina.net/commons?type=3
box model
margin margin
on top
padding padding
leftleft
text style
font
font-family:"Microsoft Yahei";
font size
font-size:50px;
font color
color:orangered;
Text alignment (left, center, right)
text-align: center;
Bold font
font-weight: bold;
Center line (delete line)
text-decoration: line-through;
Overline
text-decoration: overline;
background color
background: brown;
Height (height of the house)
height: 150px;
Line height of text (human height)
line-height:150px;
indentation
text-indent: 30px;
table style
Merge cell borders
border-collapse: collapse;
list style
remove
list-style-type: none;
number
list-style-type: decimal;
lowercase roman
list-style-type: lower-roman;
Capital Roman
list-style-type: upper-roman;
black spots
list-style-type: disc;
block
list-style-type: square;
circle
list-style-type: circle;
Replace list item tags with images
list-style-image: url(img/1.png);
Change to landscape orientation via float positioning
Mouse style
cursor:
default: pointer
pointer: finger
crosshair: cross
text: focus
wait: wait
positioning style
Classification of elements
All element tags have their own classification, block level or row level
Block level elements:
h1~h6, p, div, etc...
Top-down, vertical orientation (word wrapping): width and height can be changed
inline elements
a,b,span etc...
Left to right, horizontal orientation (no line wrapping): cannot change width and height
Inline block elements:
input, img, etc...
Left to right, horizontal direction (word wrapping): width and height can be changed
Default targeting
Block level element display
display:block;
Default Display
Inline element display
display:inline;
Cannot change width and height
Inline block element display
display:inline-block;
Can change width and height
floating positioning
A floated element can be moved left or right until its outer edge touches the parent element pixel or the border of another floated box Floated elements are still located within the parent element
float left
float:left
float right
float:right
relative positioning
The distance between this element and adjacent elements
position: relative
absolute positioning
The distance between this element and the grandfather element
position:absolute
Fixed positioning
Keep element position unchanged
positon:fixed;
z-axis (overlay display)
The larger the value, the closer to the face (closer to the face)
z-index: numerical value
Hidden text
display:none;
Hidden text
Function
Remove underline from hyperlink
text-decoration:none;
<style>css3 style
rounded corners
border-radius:50%;/*border rounded corners 50%*/(circle)
border-radius: upper left px, upper right px, lower right px, lower left px;
border-radius: upper left (upper right) px upper right (lower left) px;
shadow
box shadow
box-shadow: horizontal offset px vertical offset px blur size px shadow size px shadow color;
text shadow
text-shadow: color of shadow, horizontal direction px, vertical direction px, blur size px;
Gradient
linear gradient
background:linear-gradient([to direction] color list);
radial gradient
background:radial-gradient(color list);
The color list can have N numbers
animation
transition animation
You can only control the beginning and end, but not the process in between.
transition: css attribute of transition or animation simulation, time s used to complete the transition, transition function [delay time of transition start];
Not all attributes support transition, CSS3 only develops some attributes
Transition function:
ease
Default. Fast to slow
linear
Uniform speed
ease-in
accelerate
ease-out
slow down
ease-in-out
Accelerate first and then slow down
animation
From one state to another, every point in time in the process can be controlled.
Define animation:
@keyframes animation name{ start from{color,shape,distance...} to{color, shape, distance...} end }
@keyframes animation name{ 0%{color, shape, distance...} ... 100%{color, shape, distance...} }
Bind animation
element selector { animation: animation name, execution time s, transition function, number of executions [alternate round-trip execution]; }
infinite
Wireless execution times
<JavaScript>
JS is a web programming technology used to add interactive behavior
js is an interpreted (scripting) language. The browser interprets and executes the code without pre-processing. Compile.
Use three ways
Inside the industry
<input type="button" value="Brother click me" onclick="alert('嘤嘤嘤')";
onclick
Binding event
alert()
Pop-ups
internal
<script> alert("helloworld!") </script>
external
Create a file with the suffix ".js"
Definition:<script src="01.js"></script>
Priority: Who is on top? Who should be executed first?
variable
Because JavaScript is a weakly typed language, when defining variables, all data types are declared using var;
Numeric type: number
String: string uses double quotes or single quotes
Boolean type: true=1 | false=0 (converted into 1 and 0 during operation)
automatic type conversion
number string = string
Boolean number = number
boolean string = string
boolean boolean = number
conversion function
Convert any type to string
x.toSring();
Convert string to integer
parseInt(x)
Convert string to decimal
parseFloat(x)
Query (judge) the current type of value
typeof(x)
Cannot convert returns NaN
Prompt output box
prompt()
Prompt input box
alert()
Pop-ups
console.info()
console output
document.write()
Output the content of the page
Operator/Flow Control
Arithmetic operations
relational operations
Strictly equal
===Same type and value
not strictly equal
!==
logic operation
ternary arithmetic
Loop structure
Conditional judgment
Common objects
String
Create string object
var str="helloworld";
var str=new String("helloworld");
Commonly used methods:
ArrayArray
No matter what data type, it is Array
Three ways to initialize an array
var arr1 = new Array(); arr1[0] = 10; arr1[1] = 20; arr1[2] = 30; console.info( arr1 );
var arr2 = new Array(10,'a',true); console.info( arr2 );
var arr3 = [5,'b',false]; console.info( arr3 );
Two-dimensional array
The elements in the array are an array.
Commonly used methods for arrays:
Numeric Math
http://www.w3school.com.cn/jsref/jsref_obj_math.asp
Math.round(x)
Round to whole number
Math.floor(x)
Rounding
Math.random();
Returns a random number between 0 ~ 1.
max(x,y) returns the highest value between x and y. min(x,y) returns the lowest value between x and y.
Number encapsulation class
var data = 23.56789; alert(data.toFixed(2));//23.57
Convert a numerical value to a string and retain a certain number of digits after the decimal point
DateDate
RegExpregular expression
Common methods
RegExp.test(string)
Returns true if the string string contains text that matches the RegExp , otherwise return false
null and undefined
nudefined
There is an object, but it is worthless
null
No target
Function (like java method)
function definition
Defined by keyword function
The definition rules of function names are consistent with identifiers and are case-sensitive.
You can use variables, constants, or expressions as arguments to function calls
The return value must use return
function function name (parameter) { function body; return return value; }
function without parameters
function abc(){ for(var i = 1;i<=5;i){ console.info(i); } }
function with parameters
function he(a,b){ alert(a b); }
For functions with parameters, do not add data types when defining them.
function with return value
arguments parameter object
function he(a,b){ alert(a b); console.info( arguments.length ); //Number of parameters console.info( arguments[0] ) ;//The value of b }
arguments.length gets the number of parameter lists arguments[subscript] gets the parameters at a certain position
anonymous function
A function without a name can only be executed this time (similar to Java's anonymous inner class)
global function
They are all predefined and js prepares them for us. Just reference it directly with the method name.
common
parseInt() | parseFloat()
isNaN() determines whether it contains characters
eval(): used to convert operations in strings
encodeURI()
coding
decodeURI()
decoding
DOM object
Elements are a mechanism inside JavaScript that converts all elements in an HTML page into objects. This mechanism is "DOM" Each document is a document object.
How to find element nodes:
Get the unique object through the id value
document.getElementById(id value)
Get multiple matching objects through the name attribute value
document.getElementsByName( name value )
Get multiple matching objects through tag names
document.getElementsByTagName(tag name)
Case: Login verification
Case: interlaced color change
Case: Select all effects
Modify node style:
Format: element object.style.css attribute name="attribute value";
For example: node.style.color = "red"; node.style.fontSize = "10em"; Modify multiple styles at the same time: className = "class name";
Case: class attributes
Hierarchical search node
Because there is a blank node between the div and p tags to be parsed, #text will appear, which belongs to the text node. remove white space
Node type:
select element operation
table table element object
Create node
delete and replace
delete
replace
BOM browser object
window window object
alert(prompt message)
Prompt dialog box
confirm (prompt message)
Whether dialog box, returns Boolean type
prompt(prompt message,[content])
input dialog
window.close()
Close current browser window
window.open (open web page address, window name, [parameters])
Open a new browser window
parameter:
window timer
setTnterval(1,2); 1: Repeated actions (functions) 2: Time interval (milliseconds)
periodic timer
clearInterval(timer object)
Stop scheduled tasks
setTimeout(1,2) 1. Function to be executed 2, interval (milliseconds)
One-time timer, similar to delay effect
screen object
screen.width screen.height
Get screen resolution
historical trace objects
history.go(num)
Back to previous
If num is positive, it means moving forward If num is negative, it means going back
history.back()
Return to previous page
location object
location.href=The destination of page jump
Case page jump
eventevent
mouse events
mouse click event
onclick
Mouse double click event
ondblclick
mouseover event
onmouseover
mouse leave event
onmouseout
Keyboard events
keyboard press event
onkeydown
Keyboard release event
onkeyup
status event
onfocus
get focus
onblur
lose focus
onchange
Triggered on change
Case: Provincial and municipal cascading effects
The default mechanism for events
The triggering sequence of events is from the inside to the outside, which is the bubbling mechanism.
If two buttons fall together, both clicks will be triggered by default.
Cancel the bubbling mechanism:
event.stopPropagation();
Mouse electric shock x and y coordinates
event.chintX
event.chintY
event.target.nodeName
occur target
Object-oriented basics
Three ways to create objects
use object
Use constructor
Use literals (JSNO objects)
JSNO object
Create jsno object
Create jsno array
json complex object
JQuery framework
Introduction
1. jquery is developed by js, so jquery itself is javascript
jquery-3.3.1.js development environment jquery-3.3.1.min.js for production environment
Simple interlaced color change
<script src="js/jquery-3.3.1.js"></script> <script> $(function(){ $("tr:odd").css("background","blue"); $("tr:even").css("background","red"); }); </script>
Powerful selector
basic selector
tag selector
$("p")
id selector
$("#er")
class selector
$(".si")
Selector 1, Selector 2. . .
$("#er,.si")
level selector
descendant selector
$("#d2 p")
p1 p2
descendant selector
$("#d2>p")
p1
neighbor brothers
$("#d2 p")
nextp
all the brothers behind
$("#d2~p")
All the p’s after
Basic filter selector
first element
$("p:first")
last element
$("p:last")
Does not contain elements in not (filtering)
$("p:not(.si)")
Elements with odd subscripts
$("p:odd")
elements with even subscripts
$("p:even")
Elements with equal subscripts
$("p:eq(2)")
element greater than subscript
$("p:gt(2)")
Elements smaller than the subscript
$("p:lt(2)")
Content filter selector
Fuzzy query content The element content contains all p elements of is
$("p:contains(is)")
Select elements with empty content
$(":empty")
visibility selector
(Seconds) Display the hidden text of p element
$("p:hidden").show(1000);
form selector
:input selects all input boxes :text selects all text boxes : password selects all password boxes : radio selects all radio buttons : checkbox select all checkboxes :submit selects all submit buttons : reset selects all reset buttons : button selects all buttons : file selects all file fields : hidden selects all hidden fields
attribute selector
Attributes begin to contain xx
$("a[href^=xx]")
The end of the attribute contains xx
$("a[href$=xx]")
The attribute contains xx
$("a[href*=xx]")
form filter
Select all disabled elements
:disabled
Select all available elements
:enabled
Select selected elements
:checked
Attribute functions:
Obtain
$("img").attr("title");
Get the title attribute value of img
$("input").val();
Get the value of the input box
$("div").text();
Get the plain text content inside the div
$("div").html();
Get all the content in the div (html tag text value)
set up
$("img").attr("title","xxx");
Set the title attribute value of img
$("input").val("xxxx");
Set the value of the input box
$("div").text("xxxx");
Set the plain text content inside the div
$("div").html("xxxx");
Set all content inside the div (html tag text value)
Remove
$("img").removeAttr("title");
Remove the title attribute value of img
style function
$("p").addClass("class style");
Add class styles to elements
$("p").removeClass("class style");
Remove class style from element
$("p").toggleClass("class style");
Switch style (yes->no, no->yes)
$("p").css("css attribute")
Get the value of the css attribute of the p element
$("p").css("property","value")
Set the value of the css attribute of the p element
$("p").css({"width": "150px",...});
Set the values of multiple css attributes of the p element (jsno)
$("div").width()
Get the width of the element
$("div").height()
Get the height of the element
$("div").width(value)
Set the width of an element
$("div").height(value)
Set the height of an element
The difference between h5 and h4
Documentation Statement
Character encoding design
Case insensitive
boolean attribute
Quotes omitted
end tag omitted