@media 实例 如果文档宽度小于 300 像素则修改背景颜色(background-color): @media screen and (max- 300px) { body { background-color:lightblue; } }