css实现眼神与头跟随鼠标移动效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现眼神与头跟随鼠标移动效果代码

代码标签: 跟随 鼠标 移动 效果

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

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
<style>
body {
  background: #ffbe00;
  display: grid;
  grid-template-columns: auto auto auto;
  margin: 0;
  height: 100vh;
}

.mouth, .beard:after, .beard:before, .beard, .nose:after, .nose, .eye:after, .face, .head:after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.head {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #ce7253;
  width: 220px;
  height: 310px;
  border-radius: 115px;
  box-shadow: 0 -40px inset #673929, 0 62px inset #90503a;
  z-index: 100;
}
.head:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 220px;
  background: #ce7253;
  left: 0;
  top: 50px;
  border-radius: 60px 63px 60% 60%;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0