您的位置:首页 > 其它

三角形 div重叠

2015-07-22 14:57 246 查看
<html>

<head>

    <title></title>

    

        

<style type="text/css">

    .a{

         width:0; height:0;

         line-height:0;

         border:100px solid transparent;

         border-left-color:#ff0099;

         /*border-right-color:red;*/

         border-top-color:#ff0099;

         /*border-bottom-color:blue;*/

         /*border-right:0;*/

         z-index: 2;

         position: absolute;left: 0;top: 0;

    }

    .b{

        width: 400px;height: 400px;background-color: red;

        z-index: 1;

        position: absolute;left: 0;top: 0;

    }

</style>

    

</head>

<body>

    <div style="position:relative">

        <div class="a"></div>

        <div class="b"></div>

    </div>

 

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: