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

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
主站蜘蛛池模板: 凌海市| 梅河口市| 湘阴县| 遂溪县| 从化市| 新闻| 资兴市| 汉沽区| 浦城县| 怀柔区| 苏州市| 延长县| 客服| 湘阴县| 潼南县| 剑河县| 侯马市| 巧家县| 申扎县| 灵山县| 隆安县| 南乐县| 隆安县| 广宁县| 焦作市| 汶上县| 长丰县| 冀州市| 长阳| 简阳市| 陆丰市| 乌海市| 枝江市| 兰坪| 麻城市| 呼伦贝尔市| 天台县| 会泽县| 宁津县| 民丰县| 邵阳市|