响应式布局简单代码
来源:互联网 发布:python 获取局域网ip 编辑:程序博客网 时间:2024/06/05 21:03
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
div{float:left;}
.class1{
min-height:200px;
background-color: lightblue;
}
.class2{
min-height:250px;
background-color: lightgreen;
}
.class3{
min-height:300px;
background-color: lightcoral;
}
@media screen and (min-width: 1200px){
.class1{width:30%;}
.class2{width:50%;}
.class3{width:20%;}
}
@media screen and (min-width: 900px) and (max-width: 1200px){
.class1{width:40%;}
.class2{width:60%;}
.class3{width:100%;}
}
@media screen and (min-width: 500px) and (max-width: 900px){
.class1{width:40%;}
.class2{width:60%;}
/*.class3{width:100%;}*/
}
@media screen and (max-width: 500px){
.class1,.class2,.class3{width:100%;}
}
</style>
</head>
<body>
<div class="class1"></div>
<div class="class2"></div>
<div class="class3"></div>
</body>
</html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
div{float:left;}
.class1{
min-height:200px;
background-color: lightblue;
}
.class2{
min-height:250px;
background-color: lightgreen;
}
.class3{
min-height:300px;
background-color: lightcoral;
}
@media screen and (min-width: 1200px){
.class1{width:30%;}
.class2{width:50%;}
.class3{width:20%;}
}
@media screen and (min-width: 900px) and (max-width: 1200px){
.class1{width:40%;}
.class2{width:60%;}
.class3{width:100%;}
}
@media screen and (min-width: 500px) and (max-width: 900px){
.class1{width:40%;}
.class2{width:60%;}
/*.class3{width:100%;}*/
}
@media screen and (max-width: 500px){
.class1,.class2,.class3{width:100%;}
}
</style>
</head>
<body>
<div class="class1"></div>
<div class="class2"></div>
<div class="class3"></div>
</body>
</html>
0 0
- 响应式布局简单代码
- 响应式布局代码
- 简单实现响应式布局
- 响应式布局 简单案例
- 响应式布局代码示例
- 前端页面响应式布局 简单实现
- 简单js响应式布局实现
- 简单的响应式表格布局
- 典型的响应式布局实例代码
- 移动端响应式布局通用代码
- [响应式布局]响应式布局技巧
- 第一个响应式布局的简单页面
- 用Bootstrap写一个简单的响应式布局
- HTML5 -- 使用css3实现简单的响应式布局
- 简单的响应式布局和动画效果
- css3-Media Query实现最简单的响应式布局
- 响应式布局入门
- 响应式布局原理
- java中String类为什么要设计成final
- Java学习笔记(22)Developing Efficient Algorithms
- PAT A1065 A+B and C (64bit) (20)
- 【Codeforces 612A】The Text Splitting
- ubuntu搭建scikit-learn环境及pydev+eclipse
- 响应式布局简单代码
- 删数--约瑟夫环-- 华为2016研发工程师编程题
- SQL 查询的结果某个字段是Null,用默认的值代替
- ajax传数据和图片(base64格式)
- 实习点滴 - 破窗理论、C++ 函数模板静态库
- LogMonitor
- PhotoView 源码解析
- lua 生成1到10 的随机不重复序列
- java初始化顺序,多态以及绑定