The test environment is Firefox, IE is not measured.Directly gives the result: the fastest is the function setcss (els,name,val) {} This method of setting style, the second is to change the class name, the slowest is CSS ()
Recommended simple
Directly in the CSS below plus
Start by adding a phrase to your CSS:
The code is as follows
Copy Code
* {Filter:gray}. Clear {Clear:both}Body {Background-repeat:repeat-x}
But the above can only be used in IE
1. The origin of the problem
There is a situation in which a container (container) has two floating child elements, as shown in Figure I.
(Figure One Design view is a parent container that contains two floating child elements)
What should I
Example 1
The code is as follows
Copy Code
Hi, did you see it? This is commonly used to the surface of the wording!
The above HTML forms a surface and four sharp corners, in fact, you only need one span
1. The tag has a padding value by default in Mozilla, and only margin has a value in IE.2. the same class selector can be repeated in a document, but the id selector can only appear once. CSS is used for defining a label with both class and id. If
1. Different explanations of the box interpreter. The code is as follows:Copy code # Box {Width: 600px; // for ie6.0-Width: 500px; // for ff + ie6.0}# Box {Width: 600px! Important // for ffWidth: 600px; // for ff + ie6.0Width/**/: 500px; // for
1. Simplified CSS font attributesIn general, CSS is used to set the font attributes as follows:Font-weight: bold;Font-style: italic;Font-varient: small-caps;Font-size: 1em;Line-height: 1.5em;Font-family: verdana, sans-serifBut you can also write all
1. DIV Center The code is as follows:Copy code Body {text-align: center ;}Div {margin-right: auto; margin-left: auto ;} Note:For IE, define "text-align: center;" in the parent element.For other browsers such as FF, the data cannot be centered.
IE vs FFKey points of CSS Compatibility:DOCTYPE affects CSS processingFF: When div sets margin-left and margin-right to auto, it is already centered, and IE is not working.FF: When you set text-align for the body, you must set margin: auto (mainly
How to center the entire page content, and how to automatically scale the highly adaptive content. This is the most common problem in CSS layout learning. The following is a practical example and detailed explanation. (The experience in this article
When we define a background style, we often write this as follows: The code is as follows:Copy code Body {Background: url (img/header_top.gif) left top no-repeat;} For example, we want to define a background color and add a color to the
1. Do not let go of any small seemingly simple problem-they are often not that simple, or can draw out a lot of knowledge points;2. CSS will be used, which does not mean you will use CSS;3. Reading CSS books cannot learn the CSS language;4.
1. Verify if you have any questions.Verify the code before debugging. Incorrect XHTML/CSS format may cause many errors.First, write and test CSS code in your most commonly used browser, and try to improve the code as much as possible. Then try to be
Many of my friends told me that she/he has code cleanliness, that is, she/he is never willing to add additional tags if she/he writes XHTML ). For a simple example, I believe many people have seen this in many places: The code is as follows:Copy
CSS selector is the basis for CSS webpage layout. What are CSS selector and how to use it properly? There are three types of delimiters. Apart from the first type of HTML selector, we can name the other two types by ourselves. When naming them, note
Some time ago, the customer sent a website effect diagram. Because the customer is a graphic design engineer and has no experience in making webpages, the effect diagram uses a large number of gradient colors, and multiple layers overlap, as a
I was planning to write an article on the topic of this article, but I recently read this article in The Sina blog group, so I don't have to worry about it. I will repost it here to help you.Li {list-style-image: url (images/disc.gif );}This style
The final CSS style will overwrite all existing or conflicting styles defined earlier. For example, the following example:P {color: red; background: yellow}P {color: green}The above section will eventually display a green font with a yellow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service