Summary of daily knowledge points (1)

WBOY
Release: 2016-09-06 08:43:46
Original
881 people have browsed it

                                                                     int

Html:

1: Nested nodes should be indented by four spaces
2: Use double quotes for attributes eg: class=""
3: Single label (`
`) does not require closure.
4: All codes only use lowercase letters
5: Define the encoding method ``
6: Not required when introducing `CSS` and `JavaScript` Specify `type`
7: HTML attribute writing order id -->class -->name -->data-* -->src, for, type, href-->title, alt
8: Try to avoid generating tags in JavaScript files
9: Each block element, list element or table element should be on its own line
10: Semantic

Css:


1: Indent: 4 spaces
2: Space: space 1, space 2 (space must be included between `:` and `attribute value`)
.selector {
padding: 0px;
}
3: id naming: camel case naming, it is forbidden to use id as a style control class naming: underscore
4: All class naming, except public styles, all must start with the current module name or abbreviated name, ".modelName" + "-" + className.
eg: .login-label .login-input
5: Each selector declaration must be on its own line
eg: .post,
.page,
.comment {
line -height: 1.5;
}
6: The nesting level of the selector should not be greater than `3 levels`
7: The attribute must end with a semicolon after being defined. 8 , bottom, left)
/ display / visibility / overflow / z-index (cascading order)
Self properties: width / height / background / border / outline, etc.
Text properties: font / color / text- align / text-decoration / vertical-align / line-height
/text-indent / white-space / list-style (list style) /content, etc.
Other attributes: cursor / zoom, etc.
9: Paths in the `url()` function are not quoted.
10: Named color values ​​are not allowed for color values. The color value case items must be consistent
11: background; both horizontal and vertical positions must be given.
12: Font: Song SimSun Hei SimHei Microsoft YaHei Microsoft YaHei
13: `line-height` should use numerical values ​​when defining text paragraphs. When `line-height` is used to control vertical centering, it should still be set to the same height as the container.
eg: .container {
line-height: 1.5;
}
14: The `hack` attribute is immediately followed by the corresponding attribute


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!