Web Component实现炫酷鼠标悬停图标按钮动画效果代码

代码语言:html

所属分类:悬停

代码描述:Web Component实现炫酷鼠标悬停图标按钮动画效果代码

代码标签: Web Component 炫酷 鼠标 悬停 图标 按钮 动画

下面为部分代码预览,完整代码请点击下载或在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/reset.min.css">
  
<style>
:root {
  --space: 1rem;
  --bg: #09090b;
  --fg: #e3e3e3;
  --surface-1: #101012;
  --surface-2: #27272a;
  --surface-3: #52525b;
  --ease-out: cubic-bezier(0.5, 1, 0.89, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

* {
  box-sizing: border-box;
}

height,
body {
  height: 100%;
}

body {
  display: grid;
  color: var(--fg);
  background: var(--bg);
  padding: var(--space);
  min-height: 100vh;
}

main {
  display: grid;
  grid-template-columns: repeat(var(--count, 1), 1fr);
  gap: var(--space);
  margin: auto;
  inline-size: min(var(--max, 15rem), 100%);

  @media (min-width: 25rem) {
    --count: 2;
    --max: 30rem;
  }

  @media (min-width: 45rem) {
    --count: 4;
    --max: 60rem;
  }
}

.card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-areas: "card";
  place-items: center;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0