Principle
With the CSS feature # msgbody Div {}, it takes effect only when the ID is msgbody.
Compatibility
Compatible with IE7 +, chrome, and FirefoxIn IE6, the Select element is always at the top layer. Fix is not supported, so it can only be
Today I met a post where a foreigner asked me how to color the fileupload control. Even the MVP of a foreigner said it was not easy.
In fact, sometimes we only need to work around to solve such a small problem. Let's look at myCode.
@ Page
CSS hack is usually used to ensure compatibility with multiple browsers.
# Test {Color: red;/* all browsers support */Color: red! Important;/* supported by Firefox and IE7 */_ Color: red;/* IE6 supported */* Color: red;/* IE6 and IE7 */* + Color:
Test when a CSS slice is loaded.
Test conclusion
The following style images are loaded when the page is loaded.
Embedded Style
Embedded style sheet. Divcur {background-image: URL (image. aspx? From = style1 );}
If two
. Divcur
Solution:
We want to force a scroll bar, but sometimes we don't want a scroll bar, so we need to hide it. From the above guidance, we can easily get the answer-set the CSS Attribute Overflow value to hidden.
Procedure:
Method 1: Set CSS overflow
A block element generally starts from a new line. It can accommodate inline elements and other block elements. A common block element is the section tag 'P ". The "form" block element is special. It can only accommodate other block elements.If no
In the project framework, a lot of CSS and JS files must be referenced first. 80% of user response time is wasted on the front-end. These times are mainly caused by downloading images, style sheets, JavaScript scripts, flash and other files.
Form Action = "" Name = "" ID = "" Role = "Search" Method = "Get" > Fieldset Class = "Search" > Label Class = "Plain Ive-text" For = "S" > Search Label > Input Type = "Search" Name =
Definition and usage
The font-variant attribute sets the font of small uppercase letters to display text, which means that all lowercase letters are converted to uppercase letters, but all letters using small uppercase letters are compared with
Returned value: object {top, left}
Offset () Overview
Obtains the relative offset of the matching element in the current view.
The returned object contains two integer attributes: Top and left. This method is only valid for visible elements.
The most common difference between Firefox and IE is that! The important method provides the following methods for compatibility of different versions of other browsers and browsers, such as @ import, annotation, and attribute selector, sub-object
View the page effect in IE6, IE7, and ff. In IE7, the interval at the bottom of UL disappears, that is, the definition of the bottom margin of Li does not play a role.
At this time, we need to use CSS hack to fix it, and use * + html
* + HTML ul
A few days ago, I found someone asking me about the color change of the row in the gridview. I suddenly remembered that I wrote an article a long time ago.ArticleA simple but commonly used table style-changing the color of a row when you move the
CSS
This article is simple. You can find APIs such as background and color when you view previous documents, but you cannot find them in Versions later than 1.2. Still use CSS () directly ....
CSSCSS (name ):Access the style attribute of the
Translated from: In Search of the Holy Grail
Original article: http://www.alistapart.com/articles/holygrail
This translation page is copyrighted by greengnn. For more information, see the source.
Step 1: create a structure
XHTML starts with
Requirements: when multiple words are required in different browsers, the box will automatically extend.200pxIf the word does not exist, it is still the height. This example mainly uses(! Important)
CSSCode:
* {Padding: 0; margin: 0}
Pseudo class
: First-childPseudo class. The pseudo class adds a style to the first child element of the element.
For example, we want to make a special definition for the first element in the list.
Li: First-child {color: Red}
This
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.