MindMap Gallery HTML5
HTML5 mind map, including new tags, new form attributes, H5 compatibility solutions, responsive layout, and CSS preprocessors.
Edited at 2023-05-27 23:45:56El 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
Canvas
Element dragging
audio, video
Add new tag
Semantic structural tags
header
header
footer
footer
nav
Main navigation
main
The main content of the document, (whatwg has no semantics and is not supported by IE)
section
A section of a page or a section of an article, usually with a title
article
Define articles, blogs, posts, comments, etc.
aside
Define sidebar
hgroup
Wrap consecutive titles, such as the combination of the article's main title and subtitle (w3c will delete it)
Other new tags
state
meter
meaning
Indicates status, battery, temperature
Attributes
value
value, the default maximum value is 1
max
highest value
min
lowest value
high
Higher warning threshold
low
Lower warning threshold
optimum
The optimal value, the default is the middle, the optimal value is green, the value close to the optimal value is yellow, and the value far from the optimal value is red.
style
meter{<br> width:400px;<br> height:30px;<br>}
meter::-webkit-meter-bar{<br> /* You can set the overall border, blank area background, etc. */<br> backgroud:#fff;<br> border:1px solid #ccc;<br>}
meter::-webkit-meter-optimum-value{<br> /* Set the style within the optimal value range */<br>}
meter::-webkit-meter-suboptimum-value{<br> /* Make do with styles within the range */<br>}
meter::-webkit-meter-even-less-good-value{<br> /* bad range style */<br>}
progress
meaning
progress bar
Attributes
value
value, the default maximum value is 1
max
maximum value
style
progress{<br> width:400px;<br> height:30px;<br> border:1px solid #ccc;<br>}
progress::-webkit-progress-bar{<br> background: #fff;<br>}
progress::-webkit-progress-value{<br> background: green;<br>}
list
datalist
Baidu search box, input prompt below
<input type="text" list="searchOption"><br><datalist id="searchOption"><br> <option value="a"></option><br> <option value="ab"> </option><br> <option value="abc"></option><br> <option value="abcd"></option><br> <option value="aaa"></option>< br> <option value="acc"></option><br> <option value="bcc"></option><br> <option value="cdd"></option><br></datalist >
details
Expand content
<details open><br> <summary>Big front end</summary><br> <p>HTML5</p><br> <p>CSS3</p><br> <p>JavaScript</p>< br> </details>
Attributes
open
Comment
ruby
Text with pinyin
<ruby>魑 <rt>chi</rt></ruby><br> <ruby>enchantment <rt>mei</rt></ruby>
mark
mark
Text coloring, search results marked with keywords
Lorem ipsum <mark>dolor sit</mark> amet,
style
Background color, font
mark {<br> background: red;<br> }
image
figure
Illustrations within the article, independent content<br>
<figure> <!--Illustration--><br> <img src="images/trump.jpg" alt=""><br> <figcaption>President of the United States</figcaption> <!--Picture description- -><br> </figure>
New form properties
form form controls (input, textarea, select...)
placeholder
Prompt display
required
Required, no need to set value
autofoucs
Input box with flashing focus, no need to set value
autocomplete
Autocomplete, prompts for previously entered content, the value can be set to off/on
pattern
Write regular expressions, form validation
form element
novalidate
No verification, no need to fill in the value
New value for input type
Must contain @, and there must be content before and after @
url
Must start with http
number
parameter
min
Minimum value, closed interval
max
Maximum value, closed interval
step
step length
search
Search box, no special functions
tel
Phone number, PC version has no special function, mobile version will pop up a numeric keyboard
range
Range, default 0-100
parameter
min
max
step
color
Color, bgr format
date
date
month
years
week
Week, week: 2019-W25
time
Time: 23:20
datetime-local
date time
H5 compatibility solution
Set meta
<!--Set IE to always use the latest document mode for rendering--><br> <meta http-equiv="X-UA-Compatible" content="IE=Edge"><br> <!--Priority Use webkit (Chromium) kernel for rendering, for 360 and other shell browsers--><br> <meta name="renderer" content="webkit">
Create elements
<script><br> (function () {<br> document.createElement('header');<br> document.createElement('footer');<br> document.createElement('nav');<br> document.createElement('article');<br> document.createElement('aside');<br> document.createElement('section');<br> document.createElement('main');<br> document. createElement('figure');<br><br> })();<br> </script>
js in front
header,footer,nav,article,aside,section,main {<br> display: block;<br> }
Call html5shiv.js directly
<!--[if lt IE 9]><br> <script src="js/html5shiv.min.js"></script><br> <![endif]--><br>
Responsive layout
definition
Ethan Marcotte first proposed the term responsive web design (RWD) in 2010. In one of his articles, "Responsive Web Design · An A List Apart Article", he integrated three existing development techniques (elastic images, elastic grid layout, media and media queries) and named it responsive. Web Design. <br><br>So what is true responsive design? Marcotte said that the true responsive design method is not just about changing the layout of the web page according to the size of the visible area, but about subverting the current web design method as a whole, and is a perfect layout for web content on any device. display mechanism.
Advantage
- Development, maintenance, and operation cost advantages: There is only one page, but some different designs are made for different resolutions and different equipment environments. Therefore, in terms of development, maintenance, and operation, it can save costs compared to multiple versions. <br>- Compatibility advantages: New sizes of mobile devices are emerging one after another. Customized versions are usually only suitable for devices of certain specifications. If the resolution of the new device changes greatly, it is often incompatible, and it takes time to develop a new version. , access during this time is a problem, but responsive web design can prevent this problem in advance. <br>- Flexible operation: Responsive design is page-specific. Only necessary pages can be changed, and other pages will not be affected. <br>
Media inquiries
media type
main content
all
All devices
screen
Used for computer screens, tablets, mobile phones, etc.
For printers and print preview
Writing method
/*Media query meets certain conditions*/<br> @media print {<br> h1 {<br> font-size: 100px;<br> color: red;<br> }<br> }
media properties
main content
orientation
Equipment usage direction
landscape
horizontal direction
portrait
vertical direction
width
viewport width
/*Specify a certain width*/<br> /*The viewport width is 800px pixels*/<br> @media (width:800px) {<br> h1 {<br> color: red;<br> background: # 54ABD4;<br> }<br> }<br>
/*Set the range, set less than 600px*/<br> /* The maximum width is 600px, less than or equal to 600px*/<br> @media (max-width: 600px) {<br> h1 {<br> font-size: 100px ;<br> color: red;<br> }<br> }
/*The setting range is greater than or equal to 1000px*/<br> @media (min-width: 1000px) {<br> h1 {<br> font-size: 200px;<br> color: yellow;<br> }<br> }
operator
and
and
/* Greater than or equal to 600 and less than or equal to 1000px*/<br> @media (min-width: 600px) and (max-width:1000px) {<br> h1 {<br> font-size: 100px;<br> color : red;<br> background: #333333;<br> }<br> }<br>
or
,
/*Less than or equal to 400 or greater than or equal to 1100*/<br> @media (max-width: 400px),(min-width: 1100px) {<br> body {<br> background: pink;<br> }<br > h1 {<br><br> }<br> ul {<br><br> }<br> }
No
not
/*not to match the media type*/<br> /*not screen*/<br> @media not screen {<br><br> }
Media query usage
<!-- The first usage link can specify the media attribute and load different css--><br> <link rel="stylesheet" href="normal.css"><br> <link rel="stylesheet" href ="mobile.css" media="(max-width:640px)">
<style><br> /*The second method of importing css in imort followed by the media type is not recommended*/<br> /*import url('style.css') print;*/<br><br> <br> /*Recommend the third type @media*/<br> @media screen and (max-width: 640px) {<br><br> }<br><br> </style>
Breakpoint settings
Commonly used settings one, three breakpoints
768px
Less than 768px, ultra small screen, mobile phone
992px
Greater than 768 and less than 992px, small screen, tablet
1200px
Greater than 992px and less than 1200px, medium screen
Larger than 1200px screen
Commonly used settings two, four breakpoints
576px
Less than 572, ultra small screen
768px
577-768, small screen
992px
769-992, medium screen
1200px
993-1200, big screen
>1200, super large screen
It is recommended to set three and two breakpoints
640px
<=640px, small screen
1024px
641-1024, medium screen
>1024, big screen
end first
mobile first
* {<br> margin:0;<br> padding:0;<br> }<br> /*The default style is the mobile style*/<br> .container {<br> margin: 0 auto;< br> width: 100%; /*Mobile device width is 100% < 768px*/<br> height: 300px;<br> background: #54ABD4;<br> }<br><br> /*When width>= When 768px*/<br> /*F range is 768~991*/<br> @media screen and (min-width: 768px){<br> .container {<br> width: 750px;<br> } <br> }<br><br> /*When width>=992*/<br> /* 992 ~ 1199*/<br> @media screen and (min-width: 992px) {<br> . container {<br> width: 970px;<br> }<br> }<br><br> /*When the screen》= 1200px*/<br> /*Scope: >= 1200*/<br> @media screen and (min-width: 1200px) {<br> .container {<br> width: 1170px;<br> }<br> }
PC first
* {<br> margin:0;<br> padding:0;<br> }<br> /*Demo of silent maximum viewport width> 1200*/<br> .container {<br> margin: 0 auto ;<br> width: 1170px;<br> height: 300px;<br> background: #54ABD4;<br> }<br><br> /*When width <= 1200*/<br> /* Function at 993 ~ 1200 */<br> @media screen and (max-width: 1200px) {<br> .container {<br> width: 970px;<br> }<br> }<br><br><br > /*When width <= 992*/<br> /* 769 ~ 992 */<br> @media screen and (max-width: 992px) {<br> .container {<br> width: 750px; <br> }<br> }<br><br><br> /*When width <= 768*/<br> @media screen and (max-width: 768px) {<br> .container {< br> width: 100%;<br> }<br> }
CSS preprocessor
Why use it?
CSS syntax is not powerful enough and cannot be nested, resulting in the need to write many repeated selectors in modular development.
Without variables and a reasonable style reuse mechanism, logically related attribute values must be repeatedly output in the form of literals, which is difficult to maintain.
The CSS preprocessor provides the style layer reuse mechanism missing in CSS, reducing redundant code and improving the maintainability of style code.
Mainstream CSS preprocessors
Less
compile
js compilation
<style type="text/less"><br> // Define variables<br> @width: 400px;<br> @height: 300px;<br> @color: #888;<br><br> #box {<br> position: absolute;<br> left: 50%;<br> top: 50%;<br> width: @width;<br> height: @height;<br> margin-left: -@width /2;<br> margin-top: -@height/2;<br> border: 2px solid @color;<br> }<br><br> </style><br> <script src="js/ less.js"></script>
Koala koala compilation
index.less writing
// Define variables<br>@width: 500px;<br>@height: 300px;<br>@color: #f90;<br><br><br>#box {<br> position: absolute;<br > left: 50%;<br> top: 50%;<br> width: @width;<br> height: @height;<br> margin-left: -@width/2;<br> margin-top: -@height/2;<br> border: 2px solid @color;<br>}
Command line compilation
Install
npm install less -g
use
lessc bootstrap.less bootstrap.css
Comment
/*When the css comment is converted into css, this comment is still there*/
// The comments of less are gone when compiled into css.
variable
use
When the css property value
//Treat the less variable as the value of the css attribute<br> width: @len;
When the attribute name
// When the less variable is used as an attribute name @{variable name}<br> @{bg}: @basecolor;
when selector
// When the less variable is used as a selector @{variable}<br>#@{activeclass} {<br> width: 100px;<br> height: 100px;<br>}
variable scope
/*<br>less variable scope<br>Step 1: Use the variable, search in this scope, find it, use the last definition<br>Step 2: Can’t find it in this scope, go to Find superior scope<br>*/
// The scope of less<br>@var: 100px;<br>#box {<br> @var:20px;<br><br> .inner {<br> @var: 50px;<br> width: @var; /*60*/<br> background-color: #ccc;<br> @var: 60px;<br><br> li {<br> background: red;<br> }<br> }< br><br> width: @var; /*20*/<br>}<br><br>.list {<br> height: @var; /*100*/<br>}
Mix mixins
definition
A JavaScript-like function that can be called repeatedly
category
Normal mix
// Normal blending is the same as class selector<br>.center-box01 {<br> position: absolute;<br> left: 50%;<br> top: 50%;<br> width: 400px;<br> height: 300px;<br> margin-left: -200px;<br> margin-top: -150px;<br> background-color: #ccc;<br>}<br><br>.box01 {<br> border: 1px solid #999;<br> text-align:center;<br><br> // Call blending<br> .center-box01();<br>}<br>
Mixing without output
//After mixed compilation without output, the css will not be output<br>.center-box02() {<br> position: absolute;<br> left: 50%;<br> top: 50%;<br> width: 400px;<br> height: 300px;<br> margin-left: -200px;<br> margin-top: -150px;<br> background-color: #ccc;<br>}<br>.box02 {<br> // Call mix<br> .center-box02();<br><br> border:1px solid #ccc;<br>}<br>.list {<br> // Call without parameters For blending, () can be omitted<br> .center-box02;<br>}
Mixing with parameters
// Mixing with parameters<br>.center-box03(@width, @height, @bgcolor) {<br> position: absolute;<br> left: 50%;<br> top: 50%;<br> width: @width;<br> height: @height;<br> margin-left: -@width/2;<br> margin-top: -@height/2;<br> background-color: @bgcolor;< br>}<br><br>.box03 {<br> //.center-box03(600px, 200px, red);<br> .center-box03(1000px, 500px, #369);<br>}
Mix with default parameter values
//Default values of mixing parameters. Parameters with default values are placed at the back<br>.center-box04(@width, @height:100px, @bgcolor: gray) {<br> position: absolute;<br> left: 50% ;<br> top: 50%;<br> width: @width;<br> height: @height;<br> margin-left: -@width/2;<br> margin-top: -@height/2 ;<br> background-color: @bgcolor;<br>}<br><br>.box04 {<br> .center-box04(200px, 100px);<br> //.center-box04(200px, 100px , red);<br> //.center-box04(800px);<br>}
//Default parameter value,<br>.center-box05(@width:1000px, @height, @bgcolor) {<br> position: absolute;<br> left: 50%;<br> top: 50%;< br> width: @width;<br> height: @height;<br> margin-left: -@width/2;<br> margin-top: -@height/2;<br> background-color: @bgcolor ;<br>}<br><br>.box05 {<br> //.center-box05(400px, 300px, green);<br><br> // When calling the mix, specify which value is assigned to which parameter It doesn’t matter the order, just specify it all<br> //.center-box05(@height:500px, @bgcolor:red);<br> .center-box05(@bgcolor:blue, @height:500px, @width:400px) ;<br>}
@arguments Get all actual parameters
/*<br>transition: 1s width,height linear 1s<br>*/<br>// @arguments Get all actual parameters<br>.transition(@duration, @property:all, @timing-function:linear , @delay:0s) {<br> -webkit-transition: @arguments;<br> -moz-transition: @arguments;<br> transition: @arguments;<br>}<br><br>.box06 { <br> //.transition(2s);<br> //.transition(2s, width);<br> .transition(2s, width, ease, 1s);<br>}<br>.box06 {< br> // In addition to commas, semicolons can also be used to separate parameters<br> // Generally, commas are used. If the value of a parameter contains a comma, semicolons are used to separate the parameters<br> .transition(2s; width,height; ease; 1s);<br>}
Conditional judgment
Use with mixins
// Conditional judgment<br><br>.arrow-set(@width:5px) {<br> width: 0;<br> height: 0;<br> overflow: hidden;<br> border-style: solid ;<br> border-width: @width;<br>}<br><br>.arrow(@direction, @width:5px, @color:#000) when (@direction=up){<br> . arrow-set(@width);<br> border-color: transparent transparent @color transparent;<br>}<br><br>.arrow(@direction, @width:5px, @color:#000) when ( @direction=down){<br> .arrow-set(@width);<br> border-color:@color transparent transparent transparent;<br>}<br><br>.arrow(@direction, @width: 5px, @color:#000) when (@direction=left){<br> .arrow-set(@width);<br> border-color:transparent @color transparent transparent;<br>}<br><br >.arrow(@direction, @width:5px, @color:#000) when (@direction=right){<br> .arrow-set(@width);<br> border-color:transparent transparent transparent @color ;<br>}<br><br><br>// Call mix<br>.box {<br> //.arrow(up, 100px);<br> //.arrow(down, 100px); <br> //.arrow(left, 100px);<br> .arrow(right, 100px, red);<br>}
import
// Import mixes. If you are importing a less file, you can omit the suffix<br>@import "mixins/mixins";<br>@import "variables";<br>@import "base";
// css syntax, output directly to css<br>@import "style.css";
Nested
Operator
less built-in function
map
Sass
Stylus