Speaking of the new features of CSS3, we have to mention mediaqueries.
This article is more meticulous than the force, so many hidden really can't. So if just want to understand mediaqueries briefly, recommend reference Css3mediaqueries.
CSS2.1 defines media department, including type, group tactics and so on. CSS is not created for the display, but for all kinds of things, such as the common display, more and more handheld facilities, may be slightly outdated TV and so on.
CSS Tutorials: CSS3 Media Queries, CSS3 tutorials, CSS3 tutorials, and the introduction of mediaqueries, the role is to add an expression to determine the environment in order to use the different style sheet. In other words, it promises to enhance the experience by changing the structure of the page in a way that does not change the content, in order to conform to the different facilities. So mediaqueries is not related to CSS optimization, so it is contradictions.
Invoke Css3mediaqueries in the straight and indecent demo, when the browser width change, the use of CSS changes. And these, originally necessary JavaScript of the festival can be made.
The trend of Web mobile is becoming more and more. is a lot of domestic restrictions, but the tide is helpless. The change was also accelerated by jquery's issuance of the mobile program some time ago. The future of mediaqueries should be more exploited to better support emerging facilities like the ipad. In the real world, jquery even has mediaqueries plug-ins.
Look what Mediaqueries did.
A three-column structure, in the narrow screen environment, resulting in 1 column structure, so as to eliminate the extra two columns and leave only the general content of the 2nd column. Mediaqueries is the way things are? First look at the link tag's wording:
Code:
In Media properties:
Screen is a kind of type, CSS2.1 defined 10 varieties of
and is called the link word, the other link word also includes not (relieves a certain kind of facility), only (limited to make some kind of facility)
(min-width:400px) is a feature that is arranged in a pair of parentheses. Complete features refer to the relevant Mediafeatures department