css实现accent-color显示两种不同风格的input效果代码

代码语言:html

所属分类:表单美化

代码描述:css实现accent-color显示两种不同风格的input效果代码

代码标签: 显示 两种 不同 风格 input 效果

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        @property --hue {
          initial-value: 0;
          syntax: '<number>';
          inherits: false;
        }
        
        .animated .accented {
          -webkit-animation: rainbow calc(var(--speed, 1) * 1s) infinite linear;
                  animation: rainbow calc(var(--speed, 1) * 1s) infinite linear;
          -webkit-animation-play-state: var(--animated, paused);
                  animation-play-state: var(--animated, paused);
        }
        
        @-webkit-keyframes rainbow {
          0% {
            --hue: 0;
          }
          100% {
            --hue: 360;
          }
        }
        
        @keyframes rainbow {
          0% {
            --hue: 0;
          }
          100% {
            --hue: 360;
          }
        }
        
        .animated .accented {
          accent-color: hsl(var(--hue) calc(var(--saturation-light, 80) * 1%) calc(var(--lightness-light, 30) * 1%));
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0