# RWD @media ###### tags: `CSS` `RWD` `media` ## 語法 ``` @media mediatype and|not|only (media feature) { CSS-Code; } ``` ## mediatype ``` all : 所有設備 screen : 手機,電腦螢幕,平板 ``` ## media feature ``` device-width : 可見寬度 max-width : 最大可見寬度 ``` ## 當畫面小於300px的時候 ``` @media screen and (max-width: 300px) { body { background-color:lightblue; } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up