设为首页 加入收藏

TOP

前端技术之_CSS详解第六天--完结(六)
2019-09-03 03:32:03 】 浏览:49
Tags:前端 技术 _CSS 详解 完结
3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Document</title> <style type="text/css"> *
{ margin: 0; padding: 0; } .box1{ width: 200px; height: 200px; background: yellowgreen; position: absolute; top: 100px; left: 100px; z-index: 444; } .box2{ width: 200px; height: 200px; background: skyblue; position: absolute; top: 180px; left: 180px; z-index: 333; } </style> </head> <body> <div class="box1">绿</div> <div class="box2">蓝</div> </body> </html>

没有单位:

1 z-index: 988;

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        .linzhiying{
            width: 200px;
            height: 200px;
            background-color: blue;
            position: relative;
            z-index: 10;
        }
        .tianliang{
            width: 200px;
            height: 200px;
            background-color: orange;
            position: relative;
            z-index: 9;
        }
        .kimi{
            width: 60px;
            height: 60px;
            background-color: green;
            position: absolute;
            top: 300px;
            left: 450px;
            z-index: 454;
        }
        .cindy{
            width: 60px;
            height: 60px;
            background-color: pink;
            position: absolute;
            top: 130px;
            left: 490px;
            z-index: 45454;
        }
    </style>
</head>
<body>
    <div class="linzhiying">
        <p class="kimi"></p>
    </div>
    <div class="tianliang">
        <p class="cindy"></p>
    </div>
</body>
</html>

 

首页 上一页 3 4 5 6 下一页 尾页 6/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇CSS3实现多种背景效果 下一篇Vue中scoped css和css module比较

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目