css画皮卡丘

作者: _Dot912 | 来源:发表于2017-07-19 17:29 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="stylesheet.css">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>pikaqiu</title>
</head>
<body>   
    <div id="container">
        <div id="nose"></div>
        <div class="eye eye-left"></div>
        <div class="eye eye-right"></div>
        <div class="upperLip"></div>
        <div class="lowerLip-wrapper">
        <div class="lowerLip"></div>
      </div>
    <div class="face face-left"></div>
    <div class="face face-right"></div>
    </div>
</body>
</html>

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before{
    box-sizing: border-box;
}

*::after{
    box-sizing: border-box;
}

body{
    background: #ffe000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;    
}

#container{
    height: 300px;
    width: 460px;
    position: relative;
}

#nose{
    border: 10px solid transparent;  
    position: absolute; 
    left:50%;
    top:95px; 
    transform: translateX(-50%); 
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 16px solid black;
    border-radius: 50%;
}

.eye{
    position:absolute;
    width: 60px;
    height: 60px;
    background-color: #2e2e2e;
    border:2px solid black;
    border-radius: 30px;
    top:65px;
}

.eye-left{
    right: 50%;
    margin-right: 90px;
}

.eye-right{
    left: 50%;
    margin-left: 90px;
}

.eye::before{
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 15px;
    left: 8px;
    position: absolute;
    border: 2px solid black;
}

.upperLip{
    position: absolute;
    top:120px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.upperLip::before{
    content: '';
    display: block;
    width: 80px;
    height: 26px;
    border: 3px solid black;
    border-top:none;
    border-right: none;
    border-bottom-left-radius: 80px 40px;
    transform: rotateZ(-23deg);
    background: #ffe000;
}

.upperLip::after{
    content: '';
    display: block;
    width: 80px;
    height: 26px;
    border: 3px solid black;
    border-top: none;
    border-left: none;
    border-bottom-right-radius: 80px 40px;
    transform: rotateZ(23deg);
    background: #ffe000;
}

.lowerLip-wrapper{
    position: absolute;
    width: 100%;
    top: 130px;
    height:160px;
    overflow: hidden;
}

.lowerLip{
    position: absolute;
    border: 3px solid black;
    bottom: 0px;
    height: 1300px;
    width: 200px;
    left: 50%;
    transform: translateX(-50%);
    border-top: none;
    border-bottom-left-radius: 100px 650px;
    border-bottom-right-radius: 100px 650px;
    border-top-left-radius: 100px 100px;
    border-top-right-radius: 100px 100px;
    background: #ff444f;
    box-shadow: inset 0 1145px 0 20px #9f000a;
}

.face{
    position: absolute;
    border:3px solid black;
    background: red;
    top:180px;
    width: 80px;
    height: 80px;
    border-radius: 40px;
}

.face-left{
    right: 50%;
    margin-right: 130px;
}

.face-right{
    left: 50%;
    margin-left: 130px;
}

相关文章

  • CSS画一个皮卡丘

    教你画皮卡丘,首先需要用CSS画出皮卡丘,然后调用函数一步一步执行语句,最后呈现连续效果。下面是皮卡丘的HTML和...

  • 小米睡前故事:豆豆被抓走了

    小米是个三岁的宝宝,最近通过抖音了解可爱的萌物—皮卡丘。下午,爸爸给她画了皮卡丘的画,小米还给皮卡丘旁的爱心上了色...

  • css画皮卡丘

  • 20170419 pop手绘岛打卡day3

    今天画的是一只猫,但是怎么看着有点像皮卡丘

  • 铁豆叔PPT画画 - 展柜里的皮卡丘

    铁豆叔画画之展柜里的皮卡丘 工具:PPT画画 过程:先画皮卡丘然后组合缩小,最后画柜子 大叔也喜欢布娃娃。不买,只看。

  • 石头画:皮卡丘

  • 渣指绘

    去吧 皮卡丘 这个没有描着画,毁了,٩(ˊ〇ˋ*)و~唉,今天很潦草的完成了,下回慢慢来!

  • 每日一画 皮卡丘

    只要画两天,就可以收获四只可爱的皮卡丘,加油,打工人。

  • 【总结】2016.12.19

    计划的任务 css画icon css border-radius css box-shadow 部分页面加载更多的...

  • 皮卡丘

    自己画了一个皮卡丘,又把它剪了下来,第一次这样画呢QWQ

网友评论

    本文标题:css画皮卡丘

    本文链接:https://www.haomeiwen.com/subject/wezlkxtx.html