蓝鸥零基础学习HTML5第九讲 兼容性六
2016-09-28 13:25
369 查看
蓝鸥零基础学习HTML5第九讲 兼容性六1.兼容性16<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>
.box {width:200px;height:200px;border:1px solid #000;position: relative;}.box span {width:20px;height:20px;background: yellow;position: absolute;right:-1px;bottom:-1px;}</style></head><body><!-- 在IE6下,如果绝对定位的父级宽高是奇数的时候,子级元素的right和bottom值会有1px的偏差 --><div><span></span></div></body></html>
6.兼容性17<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>body {height: 2000px;background: red;}.box {width:200px;height: 200px;background: yellow;position: fixed;top:30px;left:100px;opacity: 0.5;filter:alpha(opacity=50);}</style></head><body><div></div></body></html>
7.兼容性18<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>.box {width:200px;height:32px;border:1px solid #000;}input {width:100px;height:30px;border:1px solid blue;margin:0;padding:0;float:left;}</style></head><body><!-- 在IE6.7下 输入型的表单标签控件上下会有1px的间隙。 处理方法:给input加浮动 --><div><input type="text"></div></body></html>
.box {width:200px;height:200px;border:1px solid #000;position: relative;}.box span {width:20px;height:20px;background: yellow;position: absolute;right:-1px;bottom:-1px;}</style></head><body><!-- 在IE6下,如果绝对定位的父级宽高是奇数的时候,子级元素的right和bottom值会有1px的偏差 --><div><span></span></div></body></html>
6.兼容性17<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>body {height: 2000px;background: red;}.box {width:200px;height: 200px;background: yellow;position: fixed;top:30px;left:100px;opacity: 0.5;filter:alpha(opacity=50);}</style></head><body><div></div></body></html>
7.兼容性18<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>.box {width:200px;height:32px;border:1px solid #000;}input {width:100px;height:30px;border:1px solid blue;margin:0;padding:0;float:left;}</style></head><body><!-- 在IE6.7下 输入型的表单标签控件上下会有1px的间隙。 处理方法:给input加浮动 --><div><input type="text"></div></body></html>
相关文章推荐
- 在Windows 8.1的IE 11中屏蔽双击放大功能
- HTML5调用摄像头实例
- Powershell 创建炫丽美观的Html报表
- 设计模式---状态模式在web前端中的应用
- Apple官网研究之使用Justify布局导航
- 关于前端的思考与感悟
- 又被事件冒泡坑了一把,这次要彻底弄懂浏览器的事件流
- 移动端点击事件全攻略,这里的坑你知多少?
- $q 实例分析 Angular 中的 Promise
- Angular directive 实例详解
- 关于浮动与清除浮动,你应该知道的
- div 2 列 50%宽度布局
- div 2 列 50%宽度布局
- 通过Mootools 1.2来操纵HTML DOM元素
- jQuery Html控件基本操作(日常收集整理)
- WEB标准网页布局中尽量不要使用的HTML标签
- Flash 与 html 的一些实用技巧
- html工作中表格<tbody>标签的使用技巧