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

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
主站蜘蛛池模板: 尼勒克县| 和静县| 玉溪市| 淄博市| 遵义市| 油尖旺区| 时尚| 东乡族自治县| 拜城县| 杭锦后旗| 通道| 洛浦县| 庄浪县| 阜城县| 安龙县| 威远县| 黄大仙区| 东海县| 若羌县| 锦屏县| 麻城市| 扶余县| 玛多县| 天镇县| 四子王旗| 保山市| 多伦县| 朝阳市| 萨迦县| 灵寿县| 梧州市| 铁岭市| 莆田市| 鹿邑县| 永春县| 胶南市| 漳浦县| 鄂托克前旗| 山东| 乌兰察布市| 邹平县|