css实现旋钮点击转动效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现旋钮点击转动效果代码

代码标签: css 旋钮 点击 转动

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        *,
        *::before,
        *::after {
          padding: 0;
          margin: 0;
          box-sizing: border-box;
        }
        :root {
          --wh: 150px;
          --wh-60: 110px;
          font-family: sans-serif;
        }
        body {
          height: 100vh;
          background-image: radial-gradient(
            circle,
            hsl(0, 0%, 100%) 50%,
            hsl(0, 0%, 80%) 90%
          );
        }
        .container {
          min-height: 100%;
          display: flex;
          flex-direction: column;
          gap: 20px;
          justify-content: center;
          align-items: center;
        }
        .dial {
          background: darkgray;
          width: var(--wh);
          height: var(--wh);
          border-radius: 50%;
          position: relative;
          cursor: pointer;
          transition: 1s linear;
          transform: rotate(0deg);
        }
        .dial::before {
          content: "";
          position: absolute;
          top: 20px;
          left: 20px;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0