HTML+CSS制小老鼠

**

HTML代码块

**

<!DOCTYPE html>
<html>
    <title>小老鼠</title>
    <link rel="stylesheet" type="text/css" href="css/xls.css">
    <body>
<div id="mouse">
    <div id="mouse_head"></div>

    <div id="mouse_ear_left"></div>
    <div id="mouse_ear_right"></div>

    <div id="mouse_eye_left_outer"></div>
    <div id="mouse_eye_right_outer"></div>
    <div id="mouse_eye_left_inner"></div>
    <div id="mouse_eye_right_inner"></div>

    <div id="mouse_nose"></div>

    <div id="mouse_whisker_left_1"></div>
    <div id="mouse_whisker_left_2"></div>
    <div id="mouse_whisker_left_3"></div>
    <div id="mouse_whisker_right_1"></div>
    <div id="mouse_whisker_right_2"></div>
    <div id="mouse_whisker_right_3"></div>

    <div id="mouse_tooth_left"></div>
    <div id="mouse_tooth_right"></div>

  </div>
</body>
  </html>

**

CSS代码块

**

#mouse{
    position: absolute;
    top: 40px;
    left: 280px;
  }
  
  #mouse_head {
    width: 200px;
    height: 200px;
    background-color: #8F9595;
    border-radius: 100px;
  }
  
  #mouse_ear_left {
    display: inline-block;
    position: relative;
    top: -230px;
    left: -25px;
    border: 12px solid #6E6E6E;
    width: 75px;
        height: 75px;
    background: #E5A95F;
        border-radius: 50%;
  }
  
  #mouse_ear_right {
    display: inline-block;
    position: relative;
    top: -230px;
    left: 25px;
    border: 12px solid #6E6E6E;
    width: 75px;
        height: 75px;
    background: #E5A95F;
        border-radius: 50%;
  }
  
  #mouse_eye_left_outer {
    width: 40px;
        height: 40px;
    position: absolute;
    top: 55px;
    left: 50px;
        background: white;
        -webkit-border-radius: 50px;
        border-radius: 50px;
  }
  
  #mouse_eye_right_outer {
    width: 40px;
        height: 40px;
    position: absolute;
    top: 55px;
    left: 110px;
        background: white;
        -webkit-border-radius: 50px;
        border-radius: 50px;
  }
  
  #mouse_eye_left_inner {
    width: 15px;
        height: 15px;
    position: absolute;
    top: 75px;
    left: 63px;
        background: black;
        -webkit-border-radius: 50px;
        border-radius: 50px;
  }
  
  #mouse_eye_right_inner {
    width: 15px;
        height: 15px;
    position: absolute;
    top: 75px;
    left: 122px;
        background: black;
        -webkit-border-radius: 50px;
        border-radius: 50px;
  }
  
  #mouse_nose {
    width: 0;
        height: 0;
    position: absolute;
    top: 110px;
    left: 75px;
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        border-top: 50px solid #6E6E6E;
    z-index: 1;
  }
  
  #mouse_whisker_left_1 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 115px;
    left: 25px;
    -webkit-transform: rotate(10deg);
  }
  
  #mouse_whisker_left_2 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 118px;
    left: 28px;
    }
  
  #mouse_whisker_left_3 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 120px;
    left: 25px;
    -webkit-transform: rotate(-10deg);
  }
  
  #mouse_whisker_right_1 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 115px;
    left: 90px;
    -webkit-transform: rotate(-10deg);
  }
  
  #mouse_whisker_right_2 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 118px;
    left: 90px;
    }
  
  #mouse_whisker_right_3 {
    width: 80px;
    height: 1.5px;
    border-radius: 2px;
    background-color: black;
    position: absolute;
    top: 121px;
    left: 92px;
    -webkit-transform: rotate(10deg);
  }
  
  #mouse_tooth_left {
    width: 15px;
    height: 22px;
    background-color: white;
    position: absolute;
    top: 170px;
    left: 84px;
    -webkit-transform: rotate(10deg);
  }
  
  #mouse_tooth_right {
    width: 15px;
    height: 22px;
    background-color: white;
    position: absolute;
    top: 170px;
    left: 102px;
    -webkit-transform: rotate(-10deg);
  }
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值