• Offline Caching:
HTML Configuration Manifest property, Cache.manifest is a cached profile
Create Cache.manifest, write down the following content
CACHE MANIFEST
#修改时间 2017-03-06 11:25
CACHE:
Test2.css
Indicates that the TEST2.CSS will be cached locally, and the next time that the browser gets it locally, even if the Test2.css file is updated, the time or version number in the annotation needs to be changed before the last update, if you want to get it back.
CACHE manifest The following comment can be either a time or a version number, and the browser compares the local annotation string and the server's comment string to determine if you want to retrieve the
In CSS, the text-align attribute allows text, pictures, and so on to be centered in block-level elements, and if you want to center the block-level element itself (horizontally centered), you can use the auto value of the margin property
<meta charset= "UTF-8"/>
<title>abc</title>
<style type= "Text/css" >
div {
width:100px;
Margin:auto;
}
</style>
<body>
<div class= "Margin" > This paragraph </div>
</body>
In CSS, display shows the way the elements are displayed, such as allowing the list (UL Li) to be displayed as a table, ul:display:table;
Li:display:table-cell;
Emmet Parent-child ligatures: Nav>ul>li*3 will automatically populate:
<nav>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</nav>
The role of the Header,article,nav,main label:
Semantic tags.
Originally write a page.
Like a head. and the bottom. We are all defining a div
Just a class=header-tail div on the head is Class=footer
Now, after HTML5 appears. Advocates semantic tagging.
Now when we write the style. The selector simply writes the header.
No need to write this div.header.
The advantage of this is that the document is structured in a clear hierarchy. Facilitate code writing and development.
And the benefits of search engine optimization,
is actually the equivalent of a semantic div, a simplified div, many attributes without
• Most HTML elements are defined as block-level elements or inline elements.
Block-level elements usually start (and end) with new rows when the browser is displayed.
Example: Inline elements usually do not start with a new row when they are displayed.
Example: <b>, <td>, <a>
A <div> element is a block-level element that is a container that can be used to combine other HTML elements.
The <div> element has no specific meaning. In addition, because it is a block-level element, the browser displays a folded line before and after it
<span> element is an inline element that can be used as a container for text
<span> elements do not have a specific meaning.
d A page must be unique, class does not require a unique
The margin property can specify 4 values, top, right, bottom, left
If only one is provided, it will be used for all four edges.
If you provide two, the first one is for the top and bottom, and the second for the left and right.
If three is provided, the first is used on, the second is used for the left and right, and the third for the next
Value can be set to auto:
Margin-top/margin-bottom calculated value of 0,margin-left/margin-right depends on the available space.
• How to center the element itself:
MARGIN:5PX Auto;
The first value is vertical up and down white, as required, if set to auto, then 0, the second value is horizontal white, set to auto will automatically according to the available blank space to the left and right use
The <label> label defines callouts (tags) for control elements such as input select.
The label element does not render any special effects to the user. However, it improves usability for the user of the mouse. If you click Text within a LABEL element, the control is triggered. That is, when the user selects the label, the browser automatically shifts the focus to the form control associated with the label.
The For property of the <label> label should be the same as the id attribute of the related element.
If you are a label for a single control, you can write this:
<label> Name:
<input type= "text" name= "username" placeholder= "name" >
</label>
If you are a group control, you can write this:
<label for= "Sex" >
Gender:
</label>
<input type= "Radio" name= "Sex" value= "male" checked> male
<input type= "Radio" name= "Sex" value= "female" > Female
When the definition is wide, the unit must be written, and if it is not written, most browsers will task to ignore this statement to the wide height
• Attribute values of the same attribute, separated by commas, representing the multiple possible values of the same attribute, which is sequential, and the first one is not, then the latter is selected, which describes the same property
Font-family: "Times New Roman", Georgia,serif;
A property has more than one set value, just use a space, not a comma:
Background:url ("amazing-sky.jpg") center center;