*****Separate content from style
1. Web standards are a series of standards, which are a series of technical standards.
When used, it is a combination application
【1】 Structured content xhtml
【2】, expressing content css
【3】Behaviorized content JavaScript
2. Web development gadget-firebug in Firefox browser
Tools-add-ons-search firebug
As a web front-end work, it is necessary to be compatible with browsers such as IE, Firefox, Google Liu, Safari, etc.
Whether the web page has a css style, test-change the text size in the browser.
3. CSS definition skills:
[1]. For future css code optimization, it is recommended that all attribute values be brought with them;
【2】Some xhtml tags have their own default css attribute values.
For example, the h1 tag has its own attribute value, which is automatically bolded and has a larger font size.
[3]. In order to be compatible with mainstream browsers, it is recommended that we reset the css attributes of all elements to standard when setting them.
[4] Different browsers have their own css attribute values - the worst thing is browser compatibility.
【5】What should I do if I want to use a special font? --Convert it into a picture.
Divided in Chinese and English fonts. Set the order of fonts, set the English fonts in front and Chinese in back.
【6】, css editing tool--it's fine to use anything, master, kill people with leaves
【7】. If you want the text to center in the vertical direction, set the line height to the element's height. The line height = element's height
【8】CSS can be reset, the default style of the xhtml tag.
4. The way the css application uses to web pages is equivalent to how to wear clothes for people.
【1】, In-line style: applied to one.
[2]. Embed style: applied to a type of tag.
[3] If we have many web pages, we need to use css and write these css into an independent file. This is an external link, and it is recommended to use it.
[4]. Import style: It is also to write the style into a file and then pour it into a web page.
*****Note that import style is actually similar to embedded style, both adding styles to web pages.
1. The import method will occupy html file space
2. Some browser parsing problems. The browser will finally read the content in @import
3. Import multiple style files into one style file.
2. Characteristics of CSSCSS is called a cascading style sheet.
1. Inheritance: The child element will inherit certain styles of the parent element.
[Because some child elements have default values themselves, they do not use parent elements]
2. Overlay: If a child element defines the same style as the parent element, the style of the parent element will be overwritten.
*****The style at the back will overwrite the style at the front
3. Priority for css styles: When there is a conflict in styles, who should I listen to?CSS priority: proximity principle
The smaller the scope of action, the higher the priority.
The closer you want to modify the style, the higher the priority.
Grandpa--Red
Dad--Green
Child--Blue
Select priority
In-line>id>class>label selector
In special cases, we can increase the permissions of a certain attribute.
*****IEtest tool also has a compatibility issue, and it cannot be opened in win7.--Download the green version of ie6. Which version is used without installing it.
4. Some commonly used texts, text-controlled css styles*****When we apply css style, we must pay attention to its default value. Because different browsers have different css default values (different attributes browsing
The support of the device is different. We also need to ensure the compatibility of our web pages and try to use the passed attributes without the need for attributes with different compatibility. )
5. CSS controls a certain state of the element-pseudo-classPseudo-class syntax:
Element name: pseudo-class name {attribute: value}
For example: The mouse passing through the hyperlink
a:hover{text-decoration:underline;}
*****If the mouse is placed on, please modify the order of the connection status LVHA
The above Html/Css (the first must-read guide for beginners) is all the content shared by the editor. I hope it can give you a reference and I hope you can support VeVb Wulin.com more.
Original address: http://www.cnblogs.com/xie-zhan/archive/2016/07/01/5631868.html