div+css实现线性图标悬浮周围圆圈高亮显示动画代码
代码语言:html
所属分类:悬停
代码描述:div+css实现线性图标悬浮周围圆圈高亮显示动画代码
代码标签: div css 线性 图标 悬浮 周围 圆圈 高亮 显示 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/open-props.easings.css"> <style> @layer demo { .bouncy-focus { --_focus-size: 0; --_focus-duration: .2s; --_focus-ease: var(--ease-out-5); box-shadow: 0 0 0 var(--_focus-size) Highlight; @media (prefers-reduced-motion: no-preference) { transition: box-shadow var(--_focus-duration) var(--_focus-ease); } &:not(:active):is(:focus-visible,:hover) { --_focus-size: 1rem; --_focus-duration: .5s; --_focus-ease: var(--ease-elastic-out-3); @supports (transition-timing-function: linear(0,1)) { --_focus-ease: var(--ease-spring-3); } } } } @layer demo.support { * { box-sizing: border-box; margin: 0; } html { block-size: 100%; color-scheme: dark light; } body { min-block-size: 100%; font-family: system-ui, sans-serif; display: grid; place-content: center; } section { display: flex; gap: 3rem; & button { background: none; border: none; padding: 0; border-radius: 1e3px; inline-size: 5rem; aspect-ratio: 1; } &am.........完整代码请登录后点击上方下载按钮下载查看
网友评论0