gsap实现猫咪睡在窗台日夜交替效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现猫咪睡在窗台日夜交替效果代码,点击猫咪有惊喜哦
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500&display=swap");
html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
font-family: "Ubuntu", sans-serif;
}
// html[data-theme='dark'] {
// }
body {
background: #d7edee;
width: 800px;
.box {
width: 80%;
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 3vw;
color: #556f80;
}
p {
color: #98aebe;
font-size: 2vw;
line-height: 1.8em;
margin-top: 10px;
}
svg #window {
cursor: pointer;
}
}
</style>
</head>
<body >
<div class="box">
<h1>点击猫咪发现惊喜</h1>
<p></p>
<svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">
<g id="window">
<path id="window__frame__outside" fill="#556f80" d="M297.762 168.842h204.444v235.735H297.762z" />
<path id="outside__bg" fill="#d7edee" d="M314.593 179.677h172.094v211.138H314.593z" />
<clipPath id="_clip1">
<path d="M314.593 179.677h172.094v211.138H314.593z" />
</clipPath>
<g.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0