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

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
主站蜘蛛池模板: 太湖县| 南昌市| 安仁县| 樟树市| 郑州市| 凤阳县| 游戏| 紫阳县| 册亨县| 兰考县| 广平县| 栾川县| 隆子县| 高要市| 长沙市| 三门峡市| 道孚县| 乐安县| 桓仁| 石林| 汨罗市| 黑河市| 阿拉善左旗| 平湖市| 谷城县| 西平县| 仪陇县| 志丹县| 木兰县| 合山市| 花莲县| 肃宁县| 卓尼县| 桃园县| 德惠市| 鹤岗市| 宁德市| 城口县| 和硕县| 乌苏市| 会宁县|