爬行的蜗牛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: golang Linux PHP
查看: 77|回复: 0

无处可逃 | 源码分享

[复制链接]

152

主题

48

回帖

1137

积分

管理员

积分
1137
发表于 2024-11-23 16:18:49 | 显示全部楼层 |阅读模式
效果演示

111.gif
源码
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title></title>
  7. </head>
  8. <style>
  9.   body{display:flex;justify-content:center;margin-top:300px;background-color:#212121;}
  10.   .light-button button.bt {
  11.     position: relative;
  12.     height: 200px;
  13.     display: flex;
  14.     align-items: flex-end;
  15.     outline: none;
  16.     background: none;
  17.     border: none;
  18.     cursor: pointer;
  19.   }
  20.   .light-button button.bt .button-holder {
  21.     display: flex;
  22.     flex-direction: column;
  23.     align-items: center;
  24.     justify-content: center;
  25.     height: 100px;
  26.     width: 100px;
  27.     background-color: #0a0a0a;
  28.     border-radius: 5px;
  29.     color: #0f0f0f;
  30.     font-weight: 700;
  31.     transition: 300ms;
  32.     outline: #0f0f0f 2px solid;
  33.     outline-offset: 20;
  34.   }
  35.   .light-button button.bt .button-holder svg {
  36.     height: 50px;
  37.     fill: #0f0f0f;
  38.     transition: 300ms;
  39.   }
  40.   .light-button button.bt .light-holder {
  41.     position: absolute;
  42.     height: 200px;
  43.     width: 100px;
  44.     display: flex;
  45.     flex-direction: column;
  46.     align-items: center;
  47.   }
  48.   .light-button button.bt .light-holder .dot {
  49.     position: absolute;
  50.     top: 0;
  51.     width: 10px;
  52.     height: 10px;
  53.     background-color: #0a0a0a;
  54.     border-radius: 10px;
  55.     z-index: 2;
  56.   }
  57.   .light-button button.bt .light-holder .light {
  58.     position: absolute;
  59.     top: 0;
  60.     width: 200px;
  61.     height: 200px;
  62.     clip-path: polygon(50% 0%, 25% 100%, 75% 100%);
  63.     background: transparent;
  64.   }
  65.   .light-button button.bt:hover .button-holder svg {
  66.     fill: rgba(88, 101, 242, 1);
  67.   }
  68.   .light-button button.bt:hover .button-holder {
  69.     color: rgba(88, 101, 242, 1);
  70.     outline: rgba(88, 101, 242, 1) 2px solid;
  71.     outline-offset: 2px;
  72.   }
  73.   .light-button button.bt:hover .light-holder .light {
  74.     background: rgb(255, 255, 255);
  75.     background: linear-gradient(
  76.       180deg,
  77.       rgba(88, 101, 242, 1) 0%,
  78.       rgba(255, 255, 255, 0) 75%,
  79.       rgba(255, 255, 255, 0) 100%
  80.     );
  81.   }
  82. </style>
  83. <body>
  84.     <div class="light-button">
  85.       <button class="bt">
  86.         <div class="light-holder">
  87.           <div class="dot"></div>
  88.           <div class="light"></div>
  89.         </div>
  90.         <div class="button-holder">
  91.           <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img">
  92.             <path
  93.               d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
  94.             ></path>
  95.           </svg>
  96.           <p>无处可逃</p>
  97.         </div>
  98.       </button>
  99.     </div>
  100. </body>
  101. <script>
  102. </script>
  103. </html>
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表