码迷,mamicode.com
首页 > Web开发 > 详细

html 7 圣诞树 浮动 相对位置

时间:2014-05-14 09:10:50      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   java   c   

bubuko.com,布布扣
<!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">


    div{
        margin:0 auto;
    }



    #triangle-up{
        width:0;
        height:0;
        border-left:80px solid transparent;
        border-right:80px solid transparent;
        border-bottom:70px solid green;
        float:right;
        position:relative;
        right:44.5%;
    }


    #triangle-up-bigger{
        width:0;
        height:0;
        border-left:140px solid transparent;
        border-right:140px solid transparent;
        border-bottom:80px solid green;
        padding-top:55px;
    }

    #treeRoot{
        width:30px;
        height:100px;
        background: brown;
    }


    </style>


</head>
<body>

    <div id="triangle-up">
    </div>
    <div id="triangle-up-bigger"></div>
    <div id="treeRoot"></div>



</body>
</html>
bubuko.com,布布扣

 

html 7 圣诞树 浮动 相对位置,布布扣,bubuko.com

html 7 圣诞树 浮动 相对位置

标签:style   blog   class   code   java   c   

原文地址:http://www.cnblogs.com/zy2012/p/3725422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!