z-index可以使用负值
2009-08-14 13:04
197 查看
z-index经常被赋正值,但它其实可以为负值的,ie和ff都兼容。写特殊效果时可以试试。
=====================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>阿当制作</title>
</head>
<style type="text/css">
.head{height:200px;background:#000;margin-left:50px;}
.layer{width:100px;height:100px;background:green;position:absolute;left:0;top:0;z-index:-2;}
.layer2{width:100px;height:100px;background:yellow;position:absolute;left:20px;top:50px;z-index:-1;}
</style>
<body>
<div class="head"></div>
<div class="layer"></div>
<div class="layer2"></div>
</body>
</html>
================================
=====================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>阿当制作</title>
</head>
<style type="text/css">
.head{height:200px;background:#000;margin-left:50px;}
.layer{width:100px;height:100px;background:green;position:absolute;left:0;top:0;z-index:-2;}
.layer2{width:100px;height:100px;background:yellow;position:absolute;left:20px;top:50px;z-index:-1;}
</style>
<body>
<div class="head"></div>
<div class="layer"></div>
<div class="layer2"></div>
</body>
</html>
================================
相关文章推荐
- z-index 可以使用负值,CSS相对定位、绝对定位利器
- z-index可以使用负值
- 写了个小例子,可以帮助了解setmetatable和__index基本使用及其意义
- 对mc可以使用this["m_" + index]的变量名称方式,
- 编辑器使用方法 1. 下载编辑器 下载 KindEditor 最新版本,下载之后打开 examples/index.html 就可以看到演示。 下载页面: http://www.kindsoft.
- z-index的负值使用
- ubuntu在linux无法联网, windows可以联网的情况下使用apt
- Delphi判断文件是否正在被使用(CreateFile也可以只是为了读取数据,而不是创建)
- UIpickview使用 【简单封装了下】数组中可以是字典,字符串
- FreeBSD配置笔记--让普通用户可以使用bash
- vue封装可以使用v-model的input输入框
- git在一个分支上修改了代码但是不想commit到本地git库,需要切换一个分支去修改代码,这个时候也可以使用git stash
- python爬虫主要就是五个模块:爬虫启动入口模块,URL管理器存放已经爬虫的URL和待爬虫URL列表,html下载器,html解析器,html输出器 同时可以掌握到urllib2的使用、bs4(BeautifulSoup)页面解析器、re正则表达式、urlparse、python基础知识回顾(set集合操作)等相关内容。
- 使用Ajax验证用户是否可以注册
- Jmail的使用,可以发送给多人
- 热更新如果是android平台的话,可以直接.cs文件到本地,然后使用反射进行加载。 如果是IOS平台的话,就没有办法直接更新.cs文件了,可以使用ULua进行搞定。
- 【翻译自mos文章】使用索引快速全扫(index ffs) 来避免全表扫描
- perl index使用
- PageSlidingTab的改进,项目中可以直接使用。
- 为什么数组没有实现Iterable接口,但可以使用foreach语句遍历?