@media only screen and (max-width:640px)中的问题,响应式布局
2020-02-03 04:09
393 查看
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="./mediaTest.css" media="(max-width:640px)" > 注: 在link中加 media="(max-width:640px)" 是对整个mediaTest.css文件起作用
用法。。。
<title>框架起手势</title>
</head>
下面是 “./mediaTest.css” 这个文件:
@media only screen and (max-width:639px) {
body { background-color: red }
/* 清楚浮动 */
.left, .right {clear: both;}
}
转载于:https://www.cnblogs.com/andy-lehhaxm/p/10359390.html
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 响应式布局@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 响应式布局设置--@media only screen and
- 媒体查询——>@media screen and (min-width: 768px)
- @media screen解决移动web开发的多分辨率问题
- min-width和max-width的兼容问题
- 转:IE6下的min-height,min-width,max-height,max-width问题
- IE6不支持max-width和min-height解决问题
- IE6-8的响应式布局问题@media
- 利用@media screen实现网页布局的自适应,@media screen and
- Mysql数据库报错:select list is not in group by clause and contains .....sql_mode=only_full_group_by问题
- iOS开发笔记-AL下label换行问题preferredMaxLayoutWidth
- 利用JS解决ie6不支持max-width,max-height问题的方法
- Fedora11上安装bugzilla出现 max_allowed_packet is read-only问题的解决方法
- 利用@media screen实现网页布局的自适应,@media screen and