gsap实现svg动画播放控制效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现svg动画播放控制效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Raleway:400,800|Satisfy&display=swap" rel="stylesheet"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: rgb(30, 20, 30); color: linen; font-family: "Satisfy", cursive; letter-spacing: 1.2px; } main { display: flex; justify-content: space-around; align-items: center; visibility: hidden; } article { position: relative; left: 50px; top: 10vh; } h1, h2 { font-family: "Raleway", sans-serif; font-size: 40px; } h1 { font-weight: 800; color: #ff6584; } h2 { font-weight: 400; } p { font-size: 20px; margin-top: 20px; } input { padding: 8px 14px; border-radius: 20px; background-color: rgb(30, 20, 30); border-bottom: 1px solid rgba(200, 200, 200, 0.5); border-right: 1px solid rgba(200, 200, 200, 0.5); border-left: 1px solid rgba(120, 120, 120, 0.4); border-top: 1px solid rgba(120, 120, 120, 0.4); box-shadow: 2px 2px 5px rgba(120, 120, 120, 0.2) inset; color: inherit; } input:focus { outline: none; } a:link, a:visited { color: linen; } a:hover, a:active { color: #ff6584; } .show-text { margin-top: 20px; color: #ff6584; text-transform: uppercase; } .letter { display: inline-block; } .controller { margin-top: 10px; display: flex; justify-content: center; margin-bottom: 20px; } button { padding: 8px 14px; border-radius: 20px; background-color: rgb(30, 20, 30); border-top: 1px solid rgba(200, 200, 200, 0.5); border-left: 1px solid rgba(200, 200, 200, 0.5); border-right: 1px solid rgba(120, 120, 120, 0.4); border-bottom: 1px solid rgba(120, 120, 120, 0.4); box-shadow: 2px 2px 5px rgba(120, 120, 120, 0.2), -4px -4px 5px rgba(120, 120, 120, 0.3); color: inherit; margin-right: 10px; } </style> </head> <body translate="no" > <main> <article> <h1>Happy</h1> <h2>520</h2> <p>What I'll be doing if this is over.</p> <div class="input-wrapper"> <label for="checklist">What's your?</label> <input type="text" id="checklist"> </div> <h2 class="show-text"></h2> </article> <div class="svg-wrapper"> <!-- <svg xmlns="http://www.w3.org/2000/svg" id="balloons" data-name="Layer 1" width="743.40429" height="753.13373" viewBox="0 0 743.40429 753.13373"> --> <svg xmlns="http://www.w3.org/2000/svg" id="balloons" data-name="Layer 1" height="500" viewBox="0 0 743.40429 753.13373"> <title>happy feeling</title> <g> <path d=&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0