纯css绘制一个眼睛效果

代码语言:html

所属分类:布局界面

代码描述:纯css绘制一个眼睛效果

代码标签: 一个 眼睛 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  margin: 0;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  height: 100vh;
}

.container .eye {
  position: relative;
  width: 20em;
  height: 20em;
  margin: 0 auto;
  background-color: #e0cbc6;
  border-radius: 100% 0px;
  -webkit-transform: rotate(45deg);
          transform: rotate(45deg);
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  border: 2px solid #5e481e;
  overflow: hidden;
  box-shadow: 5px 16px 20px 0px lightgrey;
  -webkit-animation: open 0.4s;
          animation: open 0.4s;
}
.container .eye:after {
  content: "";
  width: 24em;
  height: 24em;
  position: absolute;
  border-radius: 100%;
  background-color: white;
  box-shadow: inset -3px 4px 20px 0px lightgray;
}
.container .eye .pupil {
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0