BelowArticleIs an efficient way to translate Google CSS statements
Article: http://code.google.com/speed/page-speed/docs/rendering.html#UseEfficientCSSSelectors
Use efficient CSS styles
Overall
Avoid inefficient key selectors matching a
It has been a long time to develop with CSS. I have long planned to make a summary of the css I used. In the next period, I plan to parse some CSS usage one by one. The following is the directory:
1) Vertical-align performance in different browsers
To adapt to different versions of different browsers (ie is the main version), we need to be compatible with 6-9, and its 10 is coming soon... In IE, we can write condition comments to distinguish ie from other browsers, as well as IE versions.
For style name
If you only want IE6 to see it, use * html. head {color: #000 ;}If only IE7 is visible, use * + html. head {color: #000 ;}If only FF is visible, use: Root body. head {color: #000 ;}If only FF and IE8 are visible, use HTML>/**/body.
Difference of CSS in IE6, IE7, and Firefox
The first is the CSS hack method. Height: 20px;/* For Firefox */
* Height: 25px;/* For IE7 & IE6 */
_ Height: 20px;/* For IE6 */
Pay attention to the sequence.
This also belongs to CSS hack, but it
Line feed
automatic newline automatic newline, automatic newline, automatic newline
automatic newline automatic newline, automatic newline, automatic newline
-----------------------------------------------
Do not wrap
no line
Question: There are three blocks on the page. The width and height of the left and right blocks are fixed, and the width of the middle block is full between the left and right blocks. Then the width of the middle block can change with the browser.
The method for implementing the boundary concave state in CSS is: Set the Left and Right Border of the control (basically black and white)
For example (adjust the color ):
Border-left: 1px solid # e4e4e4;
Border-Right: 1px solid red;
Under
The last time an artist worked on a project, he found that his style sheet could not be used. After a whole day, he could only write it in the style of tags. Later I found out that I was online and asked why. In fact, I have encountered such a
From: http://www.yoyopo.cn/post/252/
CSS compatibility with browsers is sometimes a headache. Maybe when you understand the skills and principles, you will feel that it is not difficult to collect IE7 from the Internet, 6. Solve the problem of
CSS text attributes: color: #999999;/* text color */ font-family:, sans-serif; /* text font */ font-size: 9pt;/* text size */ font-style: itelic; /* italic text */ font-variant: Small-caps;/* small font */ letter-Spacing: 1pt; /* spacing between
new document product introduction link product introduction link link product introduction link link link product introduction link link link link product introduction link link link link link
CSS is perfectly compatible with general methods of IE6/IE7/FF (reproduced)
CSS compatibility with various browsers is already a common issue, and tutorials on the Internet are everywhere. The following content is not too novel. It is a
Last two articles
Article "
Div + CSSBrowser compatibility instance analysis (I)
AndDiv + CSS browser compatibility Example 2: Understanding CSS hackBoth articles talk about the compatibility between Div + CSS and browsers. This article focuses
View HTML
Code :
Example source code
[Www.52css.com]
my homepage
I love CSS
my homepage
my logs
my logs
my album
my favorites
Community Circle
I love CSS
my homepage
my logs
my album
my favorites
my
HtmlFrom the beginning to the end of the HTML document:
make the width of the content adaptive to the width of the device, one that must be added to mobile Web
disable mobile phone number links (for iPhone)
set the icon of Your webpage in
The chaos in the browser market has caused a lot of trouble for designers. After the design page is compatible, the browser must be compatible with that browser. The compatibility between IE6 and FF is easy to solve. It will be troublesome to add IE7
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