float position的測试案例
依据<a target=_blank href="http://blog.csdn.net/goodshot/article/details/44348525">http://blog.csdn.net/goodshot/article/details/44348525</a>我的測试
<p>一、</p>
<p>1.Container div is overflow is not seted ,float element is not be envoloped <br><br>
2.And the postion is seted "static" which means it is not affluncented by the css top and left ect.
<br><br>
3.According to this example,we can see the "float" css attribute is only set the element in the 0 z-index layer. </p>
<div style="background-color:#CCC;;" > <div style="width:100px;height:100px; background-color:blue; "></div> <div style="width:100px;height:100px; background-color:olive; float:left; margin-left:30px"></div>
</div>
二、<br>
<br>
1.Container div is overflow seted ,float element is be envoloped
<div style="background-color:#CCC;; overflow:auto" >
<div style="width:100px;height:100px; background-color:olive; float:left; margin-left:30px; margin-top:20px">2.this is means masked.in the 0 z-index layer.</div> <div style="width:100px;height:100px; background-color:blue; ">2. The static position is the default postion option,then this blue div is not affected by the "top" "left" ect. attributes ,the we can see it is located in the initial position. </div> </div>
以下的截图是在FF中的
三、use "box-set"( always named "clearfix" in chinese "万能闭合")
<br>
<br> <div style="background-color:#696;overflow:auto; " class="box-set" >
<div style="width:100px;height:100px;background-color:#0FF; float:left; margin-top:100px; margin-left:1000px;">
</div>
<br>
<br>
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvR29vZFNob3Q=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center">
四、parent div used css class "box-set" or "overflow:auto" can't affect the div in it. position method float doesn't work in this way .Only margin-left or margin-top can locate the div in float way.
<div style="background-color:#696;overflow:auto; " class="box-set">
<div style="position:absolute; left:200px ; top:120px ; width:100px ; height:100px; background-color:#69F"></div>
<div style="position:float; left:200px ; top:200px ; width:100px ; height:100px; background-color:#69F"></div>
</div>
float position的測试案例的更多相关文章
- Android 平台 HTTP网速測试 案例 API 分析
作者 : 万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/25996817 工信部规定的网速測试标准 : 除普通网页測速 ...
- 【Android 应用开发】Android 平台 HTTP网速測试 案例 API 分析
作者 : 万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/25996817 工信部规定的网速測试标准 : 除普通网页測速 ...
- Google开源单元測试框架Google Test:VS2012 配置
由题目可知,Google Test(简称gtest)是Google公布的一个开源C/C++測试框架,被应用于多个开源项目及Google内部项目中,包括Chrome浏览器.LLVM编译器架构.Proto ...
- Robot Framework自己主动化測试框架之我见
一些自己主动化測试现状: 盲目的去做自己主动化,终于以失败告终. 觉得是能提高效率的事情.却推广不下去: 事实上上述问题产生的原因是: 自己主动化測试案例稳定性不高,可维护性比較差: 自己主动化測试工 ...
- MySQL Study之--MySQL压力測试工具mysqlslap
MySQL Study之--MySQL压力測试工具mysqlslap 一.Mysqlslap介绍 mysqlslap是MySQL5.1之后自带的benchmark基准測试工具,类似Apache ...
- 玩转单元測试之DBUnit
本文同一时候发表在:http://www.cnblogs.com/wade-xu/p/4547381.html DBunit 是一种扩展于JUnit的数据库驱动測试框架,它使数据库在測试过程之间处于一 ...
- jsfiddle在线測试Html、CSS、JavaScript——http://jsfiddle.net/
jsfiddle在线測试Html.CSS.JavaScript,并展示測试结果 1.选择jQuery1.9.1 2.选择jQuery UI 1.9.2 3.Html <ul id="n ...
- 沧海一声笑,移动应用的CRASH原因我找到! --记最新款数字化測试“星云測试“的使用攻略
沧海一声笑,移动应用的CRASH原因我找到! --记最新款数字化測试"星云測试"的使用攻略 世界进步那么快,非常多新奇的点子层出不穷,于是我们创业.我们做最酷的手机应用,做最轰炸的 ...
- SWTBOK測试实践系列(4) -- 软件測试技术的黑白之道
白盒測试和黑盒測试往往是项目中最受争议的两种測试类型,每一个人偏爱各不同.现实生活中行业人员大多喜欢白盒測试而忽视黑盒測试,那么项目中又应该怎样平衡这两类測试呢?我们先来看两个案例. 案例一: 某移动 ...
随机推荐
- C程序设计的抽象思维-算法分析-大多数元素
[问题] 请编写下面函数 int MajorityElement(int array[],int n); 该函数返回数组array中的多数元素.多数元素是指在占绝对多数(至少51%)的一个值.假设多数 ...
- 判断Http请求由手机端发起,还是有电脑端发起
某些情形,我们需要判断Http请求是来自手机端还是电脑端,关键是取得User-Agent的信息,进行筛选判断即可. 核心类如下: public static boolean isMobileDevic ...
- ftp nfs samba比较
首先从字面意思上区分一下:1. FTP(文件传输协议)2. NFS(网络文件系统)3. samba 即smb(服务信息块)协议其中FTP 是TCP/IP协议栈所提供的一种子协议,该子协议具体可以实现在 ...
- OD: Memory Attach Technology - Off by One, Virtual Function in C++ & Heap Spray
Off by One 根据 Halvar Flake 在“Third Generation Exploitation”中的描述,漏洞利用技术依攻击难度从小到大分为三类: . 基础的栈溢出利用,可以利用 ...
- NHibernate——基本映射(5)
一.映射定义概括 1.1 映射定义(Mapping declaration) 对象和关系数据库之间的映射是用一个XML文档(XML document)来定义的.这个映射文档被设计为易读的,并且可以手工 ...
- sqlserver获取当前id的前一条数据和后一条数据
一.条件字段为数值的情况 select * from tb where id=@id; --当前记录 select top 1 * from tb where id>@id order ...
- MVC-生成验证码
1.在网上可以随便找一个生成验证码的类例如: using System; using System.Drawing; using System.Drawing.Imaging; using Syste ...
- 兼容IE的渐变
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=, startColorstr=#1471da, endColorstr ...
- jQuery插件autoComplete使用
安装/需要引入的文件 <script type="text/javascript" src="../js/jquery-1.8.3.min.js.js"& ...
- 用windows live writer写博客
用windows live writer写博客了,目前不支持writer的博客,暂时放弃,这正是我用writer写的第一篇内容. 如有知道怎么用weiter配置:凤凰博客.搜狐博客.QQ空间.百度空间 ...