- 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.js前端開發(fā)基礎(chǔ)與項目實戰(zhàn)
- Python高級機器學(xué)習(xí)
- Full-Stack Vue.js 2 and Laravel 5
- 大模型RAG實戰(zhàn):RAG原理、應(yīng)用與系統(tǒng)構(gòu)建
- Working with Odoo
- Creating Data Stories with Tableau Public
- SQL Server 入門很輕松(微課超值版)
- Learning Jakarta Struts 1.2: a concise and practical tutorial
- After Effects CC技術(shù)大全
- IBM RUP參考與認證指南
- Python數(shù)據(jù)科學(xué)實踐指南
- Android初級應(yīng)用開發(fā)
- PostgreSQL 12 High Availability Cookbook
- 例說FPGA:可直接用于工程項目的第一手經(jīng)驗