div+css清除浮动代码
2024-09-29 13:14:41
<style type="text/css">
.div1{
background:#000080;
border:1px solid red;}
.div2{
background:#800080;
border:1px solid red;
height:100px;
margin-top:10px} .left{
float:left;
width:20%;
height:200px;
background:#DDD} .right{
float:right;
width:30%;
height:80px;
background:#DDD} /*清除浮动代码*/
.clearfix:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0}
.clearfix{zoom:1}
</style> <div class="div1 clearfix">
<div class="left">Left</div>
<div class="right">Right</div>
</div>
<div class="div2">
div2
</div>
最新文章
- C#开源日志Nlog入门
- CentOS7 配置阿里云yum源
- Arch Linux PDF格式文件无法显示中文
- 生成元(Digit Generator ,ACM/ICPC Seoul 2005 ,UVa 1583)
- Linux内核等待队列
- 免解压版的Mysql的启动脚本,并且执行导入(windows)
- POJ 2586 Y2K Accounting Bug(枚举洪水问题)
- angular.js_$scope
- Python Web框架(URL/VIEWS/ORM)
- 获取android项目的数据库地址或者数据库名
- 根据点击事件去选取电脑中.rvt文件
- vue中data中引用本地图片报错404
- java web(三):ServletContext、session、ServletConfig、request、response对象
- Understanding about numerical stability, convergence and consistency
- svn+http+ad域
- Typecho 插件开发基础
- cos,sina,tan,cot
- IOS中position:fixed吸底时的滑动出现抖动的解决方案
- 如何最大限度提高.NET的性能
- 模型的偏差bias以及方差variance
热门文章
- Codeforces Round #490 (Div. 3)
- Microsoft JET Database Engine(0x80004005)未指定错误的解决方法
- 关于 Android 平台开发相关的有哪些推荐书籍?
- js 展开&;收缩 二种
- web 表单方式上传文件方法(不用flash插件)
- POJ 1698 Alice&;#39;s Chance(最大流+拆点)
- 邮箱大师WPZ协议包
- [转]FPGA网站推荐
- rtems 4.11 工具链
- 深入Asyncio(八)异步迭代器