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

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
主站蜘蛛池模板: 苏尼特左旗| 漯河市| 天津市| 石城县| 文成县| 连南| 都江堰市| 皮山县| 南充市| 东乌珠穆沁旗| 盘山县| 遂溪县| 巴林右旗| 西和县| 原阳县| 中西区| 鱼台县| 淮南市| 安多县| 新竹县| 镇赉县| 新密市| 库伦旗| 乐亭县| 灵丘县| 涿鹿县| 阳原县| 黄冈市| 洛阳市| 伊金霍洛旗| 志丹县| 新郑市| 佳木斯市| 吴堡县| 烟台市| 恭城| 武汉市| 镇原县| 正镶白旗| 佛坪县| 静乐县|