这篇文章上次修改于 2174 天前,可能其部分内容已经发生变化,如有疑问可询问作者。

在某天某夜,@惶心 在我的群里发了一张位图,他想做成矢量图。按道理来讲这个做起来其实很简单,甚至这个表情用 CSS 都可以实现。于是用了五分钟左右做了出来,哈哈哈哈~ 下面这个就是效果了!

HTML

<div class="face">
  <span class="eye a"></span>
  <span class="eye b"></span>
  <span class="mouth"></span>
</div>

CSS

.face{
  width: 200px;
  height: 200px;
  position: relative;
  border-radius: 66%;
  background: #fedf6b;
  border: 5px #222 solid;
  box-shadow: 15px -15px 0 #ffc16d inset;
}

.eye{
  top: 50px;
  right: 30px;
  width: 25px;
  height: 25px;
  position: absolute;
  border-radius: 66%;
  background: #fff;
  border: 5px #222 solid;
}

.eye.b{
  right: 95px;
}

.mouth{
    right: 50px;
    width: 50px;
    height: 40px;
    bottom: 50px;
    position: absolute;
    border-radius: 66%;
    border-bottom: 5px #222 solid;
}

预览

JSFiddle