官术网_书友最值得收藏!

Chapter 2. Media Queries: Supporting Differing Viewports

As we noted in the last chapter, CSS3 consists of a number of bolt-on modules. Media queries is just one of these CSS3 modules. Media queries allow us to target specific CSS styles depending upon the display capabilities of a device. For example, with just a few lines of CSS we can change the way content displays based upon things such as viewport width, screen aspect ratio, orientation (landscape or portrait), and so on.

In this chapter, we shall:

  • Learn why media queries are needed for a responsive web design
  • Learn how a CSS3 media query is constructed
  • Understand what device features we can test for
  • Write our first CSS3 media query
  • Target CSS style rules to specific viewports
  • Learn how to make media queries work on iOS and Android devices
主站蜘蛛池模板: 宽城| 彭山县| 邢台县| 平湖市| 万载县| 女性| 资中县| 宜黄县| 普格县| 蛟河市| 建水县| 平舆县| 定西市| 樟树市| 江津市| 临汾市| 双鸭山市| 正安县| 平顶山市| 玉树县| 平武县| 吉木萨尔县| 沙洋县| 普安县| 宜宾市| 邻水| 大足县| 垫江县| 汝城县| 天峨县| 吉安县| 丹江口市| 苍南县| 彰武县| 宁河县| 曲阜市| 莱芜市| 浦江县| 南和县| 龙州县| 隆回县|