js实现鼠标悬浮照亮树叶效果代码

代码语言:html

所属分类:悬停

代码描述:js实现鼠标悬浮照亮树叶效果代码

代码标签: js 鼠标 悬浮 照亮 树叶

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

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

<head>
  <meta charset="UTF-8">
  

  
<style>
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  background: #000;
  font-family: "Inter", sans-serif;
  user-select: none;
}

#base {
  height: 25rem;
  width: 21rem;
  animation: in 0.5s ease forwards;
  transform-origin: 50% 50%;
  z-index: 3;
  cursor: move;
  display: grid;
  place-items: center;
}
#base .leaf {
  background: linear-gradient(90deg, rgba(71, 166, 73, 0.5) 0%, rgba(128, 195, 65, 0.5) 40%, rgba(128, 195, 65, 0.5) 67%, rgba(75, 176, 71, 0.5) 100%);
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0