Original address 1190000003978778meta 1. Window width
<meta name="viewport" content="width=device-width,initial-scale=1.0, Minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
which width=device-width is to set the window width to the device window width and also to fix the width, for example: width=640 is the width of the 640px (common in);
initial-scale=1.0: Set the zoom ratio to 1.0;
minimum-scale=1.0and maximum-scale=1.0 : Minimum scale and maximum zoom ratio;
user-scalable=no: Prevents users from scaling freely, the user-scalable default value is yes .
Hint: Just that is with all parameters, generally used, there user-scalable=no is no use minimum-scale=1.0 and maximum-scale=1.0 to force the prohibition of scaling.
<meta name="viewport" content="width=device-width,initial-scale=1.0, User-scalable=no"/>
2. Automatic recognition format
<meta name="format-detection" content="telephone=no "/>
contentThe parameters inside: telephone=no is to prohibit the browser to automatically recognize the mobile phone number, email=no is forbidden to automatically recognize the browser email.
3. Full template
<meta name="viewport" content="width=device-width,initial-scale=1.0, User-scalable=no"/><meta name="format-detection" content=" telephone=no"
<meta name="format-detection" content="email=no" />
CSS Articles
Body {font-family: "Helvetica Neue", Helvetica, Stheiti, Sans-serif;/* Use sans serif fonts */}
A
img {-webkit-touch-callout:none;/* Prohibit long press link and picture popup menu */}
Html
body {-webkit-user-select:none;/* Suppresses the selection of text */User-select:none;}
button
Input
Optgroup,
Select
textarea {-webkit-appearance:none;/* Remove WebKit default form style */}
A
button
Input
Optgroup,
Select
TextArea {-webkit-tap-highlight-color:rgba (0, 0, 0, 0);/* Remove the blue outer border and the gray translucent background of a, input, and button click */}
Input::-webkit-input-placeholder {color: #ccc;/* Modify the Planceholder style of input in WebKit */}
Input:focus::-webkit-input-placeholder {color: #f00;/* Modify the Planceholder style of input in the WebKit focus state */}
body {-webkit-text-size-adjust:100%!important;/* Disable iOS resizing the font */}
Input::-webkit-input-speech-button {display:none;/* Hide Android's voice input button */}
Flex Basics
This assumes that the Flex container is .box , and the child element is .item .
1. Define the container as Flex layout
/* WebKit */ /* in-line Flex */
/* WebKit * /Display:inline-flex; }
2. Container style
. box{
Flex-direction:row | Row-reverse | Column | Column-reverse;/*Spindle direction: Left to Right (default) | Right to left | top to bottom | down to top*/
Flex-wrap:nowrap | Wrap | Wrap-reverse;/*Line break: Do not wrap (default) | line break | Wrap and the first line is below*/
Flex-flow: <flex-direction> | | <flex-wrap>;/*spindle direction and line break shorthand*/
Justify-content:flex-start | Flex-end | Center | Space-between | Space-around;/*Spindle alignment: Left-aligned (default) | right-aligned | center-justified | justify | Average distribution*/
Align-items:flex-start | Flex-end | Center | Baseline | Stretch/*Cross axis alignment: Top align (default) | bottom Align | center align | align and fill | text baseline Alignment*/
Align-content:flex-start | Flex-end | Center | Space-between | Space-around | Stretch/*Multi-spindle alignment: Top align (default) | bottom Align | center align | up and down | average distribution*/}
3. Child element Styles
. item{
Order: <integer>;/*Sort: The smaller the number, the earlier the row, the default is 0*/
Flex-grow: <number>;/*Default 0*/ /*zoom In: Default 0 (that is, if there is no space to enlarge, a value of 1 is magnified, 2 is a 1 double size, and so on)*/
Flex-shrink: <number>;/*Default 1*/ /*Zoom Out: Default 1 (Shrinks if space is low and a value of 0 does not shrink)*/
Flex-basis: <length> | Auto/*Default Auto*/ /*fixed size: The default is 0, you can set the PX value, or you can set the percentage size*/
Flex:none | [<'Flex-grow'> <'Flex-shrink'? | | <'flex-basis'>]/*Flex-grow, Flex-shrink, and flex-basis, the default value is 0 1 auto,*/
Align-self:auto | Flex-start | Flex-end | Center | Baseline | Stretch/*Individual alignment: Auto (default) | top align | bottom align | center align | align and fill | text baseline Alignment*/}
Tips 1. Customizing the Apple icon
Put a file in the root directory of the Web site apple-touch-icon.png , the Apple device to save the site as a bookmark or desktop shortcut, it will use this file as an icon, file size is suggested: 180pxx180px.
2. Custom Favicon:
<link rel="icon" href="favicon.ico" mce_href= " Favicon.ico " type=" > "image/x-icon"
3. Define Browser click behavior:
<a href="tel:020-10086"> Call:020-10086</a> <a href= " sms:10086 " 10086</a> <a href="mailto:[email protected"> Send email: [Email Protected]22278.club</a>
4. Define the upload file type and format
<input type=file accept="image/*">
in the File upload box above,acceptyou can limit the types of files that are uploaded, the parameters areimage/*is all picture types, click will pop up the gallery, you can also specify the picture format, parameters set toimage/pngYou can restrict the image type to PNG;video/*It is the choice of video meaning;acceptYou can also set multiple file formats with the syntaxaccept="image/gif, image/jpeg";5. Usebox-shadowChange (block) The yellow color after the form is automatically populated
Select 0 0 0 1000px #fff; }
6. Using CSS to implement ellipsis text truncation
White-space:nowrap; Text-overflow:ellipsis;
7. Use border to draw a small triangle
The principle is: up and down and around the border docking is actually a bevel, using this feature, make one side of the border transparent, the other side of the desired color and hide on the edge, you can become a small arrow shape.
Tootip notation:
/*--css--*/
. box {position:relative; padding:0 20px; width:380px; height:80px; border-radius:8px; background: #efefef; font-size : 18px; line-height:80px; }
. box:after {position:absolute; top:50%; left: -15px; z-index:1; display:block; margin-top: -15px; width:0; Border-co Lor:transparent #efefef; Border-style:solid; border-width:15px 15px 15px 0; Content: "";}
Mobile Web front-end development resource integration