But under the IE6, the position:fixed attribute is not supported, and we need to handle the IE6 hack. The solution is to use the Postion:absolute attribute, its role is very familiar, relative to the parent element for absolute positioning, and then
In IE we simply use the CSS property of Text-overflow to implement the text overflow ellipsis.
Cases
The code is as follows
Copy Code
. entry_title{White-space:nowrap;Overflow:hidden;Text-overflow:ellipsis;}
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
Previously do flash JS ads the same page can only be called once, this article provides the JS CSS tutorial picture switching effect can be called multiple times, and can be used normally.
js CSS Picture Switching effects (multiple calls to the
By default, background properties are tiled, and if the background picture is larger and box is small, you can only display the background in the upper-left corner. If you want the background to be all displayed,
The code is as follows
CSS pseudo element is very powerful, it is often used to create CSS triangle hint, use CSS pseudo element can achieve some simple effect but do not need to add extra HTML tag. One thing is that JavaScript cannot get these CSS property values, but
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
Tip: you can modify some code before running Shadow Link text produced by CSS Website homepage Website homepage Website homepage Website homepage Website homepage Tip: you can modify some code before running
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