html float 浮动
来源:互联网 发布:mac dock图标大小 编辑:程序博客网 时间:2024/06/05 12:07
<head> <meta charset="UTF-8"> <title>浮动</title> <style> .d1{ background-color: #c0ff29; width: 200px; height: 200px; float: left; } .d2{ background-color: #ff464a; width: 200px; height: 200px; float: left; } .d3{ background-color: #f0fff6; width: 200px; height: 200px; float: left; } .d4{ background-color:black; width: 200px; height: 200px; clear: left; float: left; /*clear: right;清除右浮动*/ /*clear: both;清除左右浮动*/ /*清除浮动*/ } .d5{ background-color:yellow; width: 200px; height: 200px; float: left; /*相对定位*/ position: relative; top: 20px; left: 20px; } .d6{ background-color: #c215ff; width: 200px; height: 200px; clear: left; /*position: relative;*/ } .d7{ background-color: #ffdcdf; width: 20px; height: 20px; float: left; /*绝对定位*/ position: absolute; top: 20px; } </style></head><body><!--class 定义style的名字--><div class="d1"></div><div class="d2"></div><div class="d3"></div><div class="d4"></div><div class="d5"></div><div class="d6"> <div class="d7"></div></div></body>.d6 不注释掉的话,div7,会在div6的边框里面,float结束一定要清除
0 0
- html float 浮动
- 【Html】CSS浮动(float,clear)通俗讲解
- 浮动( Float )
- float浮动
- 浮动 float
- float 浮动
- float浮动
- float 浮动
- float浮动
- 浮动(float)
- [html]div css float浮动用法(left right)
- HTML float浮动标签和background 背景标签
- html中清除浮动(float)带来的影响
- html、css清除浮动float的三种方法
- float浮动以及清除浮动
- 浮动元素(float)
- Float(浮动)概念
- 浮动元素(float)
- 点更新主席树
- PDF文件压缩
- 单例模式详解
- 最小表示
- 百度搜索URL参数你知道多少
- html float 浮动
- Win7 下使用 VS2015 交叉编译最新 libcurl 7.51.0(包含openssl-1.0.2j,zlib-1.2.8)
- uva 331 Mapping the Swaps
- 树状数组
- K-means算法对地图上点进行聚类(未修订篇)
- 多层循环的跳出(return goto break continue 的用法与区别)
- spring4之搭建restful风格的web服务
- 树链剖分
- 用IBExpert管理firebird