freeCodeCamp/guide/chinese/certifications/responsive-web-design/responsive-web-design-princ.../create-a-media-query/index.md

22 lines
418 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Create a Media Query
localeTitle: 创建媒体查询
---
## 创建媒体查询
按照说明:
添加媒体查询以便当设备的高度小于或等于800px时p标签的字体大小为10px。
媒体查询是:
```css
/* Add media query below */
@media (max-height: 800px){
p {
font-size: 10px;
}
}
```
当设备的宽度小于或等于800px时文本大小为10px。