Basic concepts
Responsive development in the absence of media queries, can also be achieved through JS, but people do not consider, especially cumbersome. In the presence of media queries, it is only beginning to gradually promote the response style. In the actual development, in time and money sufficient situation still do not do response, affect performance, maintenance trouble.
Basic use
1, the screen is greater than or equal to 480px, using parentheses in the
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Title</title> <style>@media screen and (min-width:480px){Body {Background-color:Black; } } </style></Head><Body></Body></HTML>
2, the screen is less than or equal to 1000px, using parentheses in the
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Title</title> <style>@media screen and (max-width:1000px){Body {Background-color:Black; } } </style></Head><Body></Body></HTML>
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Title</title> <style>@media screen and (max-width:1000px){. header{Display:None; }}. Header{width:100%;Height:50px;Border:1px solid #304115; } </style></Head><Body><Divclass= "header"></Div></Body></HTML>
Mobile web--Media Query