css实现一个橡胶按钮悬浮膨胀效果代码

代码语言:html

所属分类:悬停

代码描述:css实现一个橡胶按钮悬浮膨胀效果代码

代码标签: css 橡胶 按钮 悬浮 膨胀

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">


    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Rubik:wght@500&amp;display=swap'>

    <style>
        :root {
          --motion-ease: cubic-bezier(0.68, -0.6, 0.32, 1.6);
          --motion-duration: 0.3s;
        }
        
        * {
          box-sizing: border-box;
        }
        
        html {
          height: 100%;
        }
        
        body {
          align-items: center;
          background: #252b32;
          display: flex;
          font-family: 'Rubik', sans-serif;
          font-size: clamp(16px, 5vw, 32px);
          justify-content: center;
          margin: 0;
          min-height: 100%;
          padding: 1.5em;
        }
        
        button {
          -webkit-appearance: none;
             -moz-appearance: none;
                  appearance: none;
          background: transparent;
          border: 0;
          color: #fff;
          cursor: pointer;
          font: inherit;
          font-weight: 500;
          line-height: 1;
          padding: 1em 1.5em;
          position: relative;
          transition: filter var(--motion-duration);
        }
        
        button:hover {
          filter: brightness(1.1);
        }
        
        bu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0