- Responsive Web Design with HTML5 and CSS3
- Ben Frain
- 140字
- 2021-08-06 20:03:41
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
推薦閱讀
- Vue 3移動Web開發與性能調優實戰
- GAE編程指南
- Vue.js 3.0源碼解析(微課視頻版)
- Elasticsearch for Hadoop
- 零基礎學單片機C語言程序設計
- Apache Spark 2.x for Java Developers
- Windows內核編程
- C語言程序設計
- Scala Data Analysis Cookbook
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- ABAQUS6.14中文版有限元分析與實例詳解
- Learning Image Processing with OpenCV
- Clojure Web Development Essentials
- Mastering ArcGIS Server Development with JavaScript
- 像程序員一樣使用MySQL