题解 | #圣诞树#

圣诞树

https://www.nowcoder.com/practice/4924913926d94e96a70bbf2a50847852

<!DOCTYPE html>
<html>
    <head>
        <meta charset=utf-8>
        <style type="text/css">
            .topbranch {
                width: 0px;
                height: 0px;
                /*
                * TODO: 上枝叶效果
                */
                float:top;
                border:100px solid green;
                border-left-color:transparent;
                border-right-color:transparent;
                border-top-color:transparent;
                margin-left:100px;
                margin-top:-100px;
               
            }
            .middleBranch {
                width: 0px;
                height: 0px;
                /*
                * TODO: 中枝叶效果
                */
                margin-top:-200px;
                float:top;
                border:200px solid green;
                border-left-color:transparent;
                border-right-color:transparent;
                border-top-color:transparent;
               
            }
            .base {
                /*
                * TODO: 树干效果
                */
                float:top;
                margin-left:165px;
                width:70px;
                height:200px;
                background:gray;
               
            }
        </style>
    </head>
    <body>
        <section class="topbranch"></section>
        <section class="middleBranch"></section>
        <section class="base"></section>
    </body>
</html>
##这个float:top我觉得就挺好的,可惜不适合这个题目。
也算遇到了一个float:top适用的场景
全部评论

相关推荐

感觉今年拿到大厂实习offer的人很多,光是身边同学室友都是好几个offer。由此可见,秋招得有多卷
小浪_Coding:必须卷的起飞, 应该比25更卷一点, 25已经是哀声一片了, 26会更难一点, 现在还有`很多25未找到的
点赞 评论 收藏
分享
qq乃乃好喝到咩噗茶:院校后面加上211标签,放大加粗,招呼语也写上211
点赞 评论 收藏
分享
评论
点赞
3
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务