gsap实现可拖动悬浮液态融合弹出层代码
代码语言:html
所属分类:弹出层
代码描述:gsap实现可拖动悬浮液态融合弹出层代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap'); /* @import 'normalize.css' layer(normalize); */ @layer normalize, base, demo; @layer demo { :root { --color: color-mix(in hsl, canvas, canvasText 10%); --bg: color-mix(in hsl, canvasText, canvas 20%); --blue: color-mix(in hsl, hsl(210 80% 50%), canvas 25%); --green: color-mix(in hsl, hsl(140 80% 60%), canvas 25%); --list: 200px; --speed: 0.2s; --power-1-in: linear(0 0%, 0.0027 3.64%, 0.0106 7.29%, 0.0425 14.58%, 0.0957 21.87%, 0.1701 29.16%, 0.2477 35.19%, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987 68.28%, 0.875 75%, 0.9297 81.25%, 0.9687 87.5%, 0.9922 93.75%, 1 100% ); --elastic: linear(0 0%, -0.0055 4.83%, -0.0317 15.58%, -0.0351 20.24%, -0.031 23.11%, -0.0216 25.78%, -0.0065 28.32%, 0.0143 30.74%, 0.0478 33.58%, 0.0907 36.32%, 0.2048 41.53%, 0.3517 46.27%, 0.6096 52.68%, 0.7371 56.42%, 0.8583 61.09%, 0.9466 66.02%, 0.9811 68.81%, 1.0068 71.72%, 1.0241 74.79%, 1.0334 78.07%, 1.0326 83.83%, 1.0053 95.23%, 1 100% ); } .arrow { width: clamp(120px, 15vmin, 200px); container-type: inline-size; position: absolute; bottom: 8rem; left: 8rem; color: color-mix(in hsl, canvasText, #0000 40%); } .arrow svg { width: 100%; scale: -1 -1; } .arrow label { font-family: 'Gloria Hallelujah', cursive; position: absolute; left: 80%; bottom: 25%; rotate: 8deg; font-size: 20cqi; white-space: nowrap; } /* Handles the CTA button */ [popovertarget='status'] { position: fixed; width: 44px; aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--bg); color: var(--color); display: grid; place-items: center; padding: 0; cursor: pointer; anchor-name: --anchor; inset: unset; margin: 0; top: calc(100vh - 2rem - 44px); left: 2rem; svg { width: 50%; } } /* The actual popover content inside unfiltered content */ dl { display: grid; position: absolute; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 0; width: var(--list); padding: 1rem; color: var(--color); font-family: monospace; line-height: 1; } dd, dt { padding: 0; margin: 0; } dd { text-align: right; } /* Popover styling */ #status { /* default anchor to use */ position-anchor: --anchor; border: 0; padding: 0; margin: 0;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0