点击查看html编辑器说明文档

css滑稽edit icon

|
|
Fork(复制)
|
|

👉 新版编辑器已上线,点击进行体验吧!

BUG反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <div class="face"> 
    <div class="eye left"> 
        <div class="brow-left"></div>
    </div>
    <div class="eye right">
        <div class="brow-right"></div>
    </div>
    <div class="mouth"> </div>
</div>
        
编辑器加载中
</body>
CSS
格式化
            
            html, body{
    margin: 0px;
    padding: 0px;
    
}
:root{
    --size : 200px;
    --eye-width : 70px;
    --eye-height : 10px;
    --mouth-width : 160px;
    --mouth-height : 160px;
}
.face{
    width: var(--size);
    height: var(--size);
    background-color: yellow;
    border-radius: 50%;
    position: relative;
    /* border: 3px solid #000; */
}

.face{
    margin: 20px auto;
}

.face{
    /* animation: jumpAnima 1s infinite linear; */
}

@keyframes jumpAnima{
    0%{
        /* transform: translateY(0px) scaleY(0.5) rotate(0deg); */
        transform: rotate(0deg);
    }

    50%{
        /* transform: translateY(-150px) scaleY(1.5) rotate(180deg); */
        transform: rotate(180deg);
    }

    100%{
        /* transform: translateY(0px) scaleY(0.5) rotate(360deg); */
        transform: rotate(360deg);
    }
}

.eye{
    width: var(--eye-width);
    height: var(--eye-height);
    background-color: #fff;
    border: 3px solid #888;
    border-radius: 50%;
    position: absolute;
    top: 30%;
    box-shadow: 0px 25px 3px -3px rgb(240, 174, 174);   
}

.eye::before{
    content: ' ';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #000;
    display: inline-block;
    position: absolute;
    left: 10px;
}

.left{
    left: 10px;
}

.right{
    right:10px;
}

.mouth{
    width: var(--mouth-width);
    height: var(--mouth-width);
    border-radius: 50%;
    /* background-color: #000; */
    box-shadow: 0px 6px 0px 0px rgb(120, 74, 8);
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
}

.brow-left, .brow-right{
    width: 30px;
    height: 20px;
    
    position: absolute;
    top: -35px;
    border-radius: 50%;
}

.brow-left{
    /* border-top-right-radius: 8px; */
    /* border-right: 3px solid #000; */
    /* border-top: 3px solid #000; */
    right: 6px;
    transform: rotate(-135deg);
    box-shadow: 4px 4px 0px -2px rgb(120, 74, 8);

}

.brow-right{
    /* border-top-left-radius: 8px; */
    /* border-left: 3px solid #000;
    border-top: 3px solid #000; */
    left: 6px;
    transform: rotate(135deg);
    box-shadow: -4px 4px 0px -2px rgb(120, 74, 8);
    
}
        
编辑器加载中
JS
格式化
            
            
        
编辑器加载中
预览
控制台