
如何利用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,我们会在看到邮件的第一时间内为您处理!

vue项目中如何重新渲染组件(刷新组件)
按键精灵2014正式版
ComfyUI-Copilot