css会眨眼的皮卡丘

简介: css会眨眼的皮卡丘

微信截图_20230504230449.png


<html>
  <head>
      <meta charset="utf-8" />
        <title>j绝对定位</title>
        <style>
      body {
        background: -webkit-linear-gradient(top,#2B8BD2 0%,#59D2A5 100%);
      }
      .face{
        width: 300px;
        height: 200px;
        border: 1px solid #ccc;
        margin: 200px auto;
        background-color: orange;
        position:relative;
      }
      .ear {
        width: 45px;
        height: 200px;
        background-color: orange;
        position: absolute;
      }
      .ear_left {
        transform: rotate(-38deg);
        top: -154px;
        left: -48px;
        border-radius: 56px 0 0 0;
      }
      .ear_right {
        transform: rotate(34deg);
        left: 301px;
        top: -160px;
        border-radius: 0 56px 0 0;
      }
      .ear_left .a {
        background-color: #000;
        width: 100%;
        height: 52px;
        border-radius: 56px 0 0 0;
      }
      .ear_right .a {
        background-color: #000;
        width: 100%;
        height: 52px;
        border-radius: 0 56px 0 0;
      }
      .eye_left {
        position:absolute;
        width:45px;
        height:45px;
        border-radius:50%;
        background:#222;
        left: 52px;
          top: 48px;
        overflow:hidden;
      }
      .eye_left .ball_1 {
        position:absolute;
        width:16px;
        height:16px;
        border-radius:50%;
        background:#fff;
        top:26px;
        left:10px;
      }
      .eye_left .ball_2 {
        position:absolute;
        width:10px;
        height:10px;
        border-radius:50%;
        background:#fff;
        top:12px;
        left:28px;
      }
      .eye_right {
        position:absolute;
        width:45px;
        height:45px;
        border-radius:50%;
        background:#222;
        right: 52px;
          top: 48px;
        overflow:hidden;
      }
      .eye_right .ball_1 {
        position:absolute;
        width:16px;
        height:16px;
        border-radius:50%;
        background:#fff;
        top:12px;
        left:5px;
      }
      .eye_right .ball_2 {
        position:absolute;
        width:10px;
        height:10px;
        border-radius:50%;
        background:#fff;
        top:26px;
        left:27px;
      }
      .norse {
        width: 13px;
        height: 9px;
        background: #000;
        position: absolute;
        bottom: 66px;
        left: 139px;
        border-radius: 0 0 6px 6px;
      }
      .mouth{
        width: 50px;
        height: 30px;
        background: #D80C32;
        position: absolute;
        border-radius: 0 0 20px 20px;
        left: 122px;
        bottom: 13px;
      }
      .lianjia_left {
        width: 40px;
        height: 40px;
        background: red;
        position: absolute;
        border-radius:50%;
        bottom:28px;
        left:20px;
      }
      .lianjia_right {
        width: 40px;
        height: 40px;
        background: red;
        position: absolute;
        border-radius:50%;
        bottom:28px;
        right:20px;
      }
      .blink {
        animation:blink_frames 5s infinite ease;
      }
      @keyframes blink_frames {
        0% {
          height:45px;
        } 
        40% {
          height:5px;
          top:75px;
        }
        80% {
          height:5px;
          top:75px;
        }
        100% {
          height:45px;
          top: 48px;
        }
      }
        </style>
    </head>
    <body>
        <div class='face'>
          <div class='ear ear_left'>
              <div class='a'></div>
            </div>
            <div class='ear ear_right'>
              <div class='a'></div>
            </div>
            <div class='eye_left blink'>
              <div class='ball_1'></div>
                <div class='ball_2'></div>
            </div>
            <div class='eye_right blink'>
              <div class='ball_1'></div>
                <div class='ball_2'></div>
            </div>
            <div class='norse'></div>
            <div class='mouth'></div>
            <div class='lianjia_left'></div>
            <div class='lianjia_right'></div>
        </div>
    </body>
</html>
相关文章
|
11月前
|
前端开发
CSS实现漂浮的气球
CSS实现漂浮的气球
|
6天前
|
前端开发 UED
css3的禁忌
在使用 CSS3 时,需遵循最佳实践以确保代码的可维护性和跨浏览器兼容性。避免过度使用复杂选择器,确保添加 `-webkit-`、`-moz-` 等前缀;优先采用相对单位 `%`、`em`、`rem`;关注视觉辅助工具的可及性;利用 CSS 类减少重复样式;合理使用媒体查询实现响应式设计;优化动画效果,避免性能下降;谨慎混合使用布局模型,如 Flexbox 和 Grid;持续测试不同浏览器以确保兼容性。
|
4月前
|
前端开发
CSS字型
CSS字型。
34 5
|
2月前
|
前端开发
css特效实例——纯css实现带边角卷边阴影的纸
css特效实例——纯css实现带边角卷边阴影的纸
22 1
|
3月前
|
Web App开发 机器学习/深度学习 前端开发
|
4月前
|
前端开发
css实现风车样式
css实现风车样式
30 0
|
4月前
|
前端开发
css流光效果简单版
css流光效果简单版
80 0
|
11月前
|
前端开发
|
11月前
|
前端开发
CSS实现霓虹灯牌效果
CSS实现霓虹灯牌效果
|
前端开发
那些炫酷的CSS文字效果之诗词《兔》
那些炫酷的CSS文字效果之诗词《兔》
99 0