gsap+svg实现鼠标悬浮河马张开大嘴动画效果代码

代码语言:html

所属分类:悬停

代码描述:gsap+svg实现鼠标悬浮河马张开大嘴动画效果代码

代码标签: gsap svg 鼠标 悬浮 河马 张开 大嘴 动画

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

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

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

    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:400'>
<style>
    html,
body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e313f;
}

button {
  width: 242px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.ear-left-outer, .ear-right-outer {fill:#919191;}
.ear-left-inner, .ear-right-inner {fill:#6D6D6D;}
.eye-right-outer, .eye-left-outer, .nostril-right-outer, .nostril-left-outer, .body {fill:#AAAAAA;}
.eye-right-inner, .eye-left-inner {fill:#FFFFFF;}
.nostril-right-inner, .nostril-left-inner{fill:#8C8C8C;}
.freckle {fill:#7C7C7C;}
.tongue {fill:#FF4848;}
.tooth-left, .tooth-right {fill:#FFFFE1;}

.link {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: #ffffe3;
  text-decoration: none;
  position: absolute;
  bottom: 20px;
  right: 20px;
  border: 2px solid #335067;
  padding: 10px 14px;
  border-radius: 4px;
  transition: background 0.2s;
}

.link:hover {
  background: #243a4a;
}
</style>

</head>

<body>

    <button>
  
<svg viewBox="0 0 242 109" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <g class="ears">
    <g class="ear-left">
      <.........完整代码请登录后点击上方下载按钮下载查看

网友评论0