js+css实现鼠标悬浮字母重力跳跃抖动动画代码
代码语言:html
所属分类:悬停
代码描述:js+css实现鼠标悬浮字母重力跳跃抖动动画代码
代码标签: js css 鼠标 悬浮 字母 重力 跳跃 抖动 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Sour+Gummy:wdth,wght@100..125,100..900&display=swap");
:root {
/* Animation Physics */
--jelly-duration: 0.9s;
--stagger: 0.035s;
--easing: cubic-bezier(0.25, 1, 0.5, 1);
/* Transform Physics */
--squash-scale-x: 1.35;
--squash-scale-y: 0.65;
--squash-ty: 12%;
--stretch-scale-x: 0.75;
--stretch-scale-y: 1.35;
--stretch-ty: -22%;
--overshoot-scale-x: 1.15;
--overshoot-scale-y: 0.85;
--overshoot-ty: 6%;
--settle1-scale-x: 0.92;
--settle1-scale-y: 1.08;
--settle1-ty: -3%;
--settle2-scale-x: 1.03;
--settle2-scale-y: 0.97;
--settle2-ty: 1%;
/* Variable Font Physics */
--base-wght: 700;
--base-wdth: 85;
--squash-wght: 900;
--squash-wdth: 80;
--stretch-wght: 450;
--stretch-wdth: 90;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Sour Gummy", system-ui, sans-serif;
background: conic-gradient(oklch(100% 0 0/0.1) 90deg, transparent 90deg 180deg, o.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0