定位布局
媒体查询的代码:
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> .a {
border: 1px solid #000000;
width: 100px;
height: 100px;
background-color: #000000;
}
@media only screen and (min-width: 300px) and (max-width: 640px) {
.a {
background-color: red;
}
} @media only screen and (min-width: 700px) {
.a {
background-color: green;
}
} @media only screen and (max-width:200px ) {
.a {
background-color: blue;
}
} </style> </head> <body> <p class="a"></p> </body></html>以上就是web中媒体查询的方法 的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号