1.media控制布局
<link type="text/css" rel="stylesheet" href="css04.css" media="only screen and (max-width:640px)">
<style>
@media screen and (max-width:600px) {
body{
background-color: aquamarine;
}
}
@media screen and (min-width: 600px) and (max-width: 960px){}
</style>
2.bootstrap
http://getbootstrap.com/
很强大,支持响应式布局
时间: 2024-10-11 08:11:04