
如何利用css语法中@media实现响应式布局,下面web建站小编给大家简单介绍一下具体实现代码!
@media only screen and (max-width: 600px) {
body {
font-size: 14px;
background-color: yellow;
}
}
@media only screen and (min-width: 601px) and (max-width: 1024px) {
body {
font-size: 16px;
background-color: blue;
}
}
@media only screen and (min-width: 1025px) and (max-width: 1400px) {
body {
font-size: 18px;
background-color: red;
}
}
@media only screen and (min-width: 1401px) and (max-width: 1600px) {
body {
font-size: 18px;
background-color: red;
}
}
@media only screen and (min-width: 1601px) {
body {
font-size: 18px;
background-color: red;
}
}
上面是“css如何利用@media实现响应式布局”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4196.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

介绍5种获取时间戳方法
Motion Vue:无需编写复杂的命令式代码,轻松实现动画效果
DynamicCity:上海人工实验室联合多家大学共同开发的一种面向4D场景的生成框架
火绒杀毒软件网页版下载入口(附官网下载地址)