avatar
纯CSS实现按钮提交等待效果,半透明 + loading动画 + disable,不用任何js/html,仅需一个css即可

admin 96 2019-03-17 22:48:28

                                           
                         button {
            opacity: 0.5;
            cursor: default;
            pointer-events: none;
        }

        button:before {
            content: '';
            display: inline-block;
            width: 1em;
            height: 1em;
            margin-right: 0.5em;
            color: red;
            border: 1px solid red;
            border-radius: 50%;
            vertical-align: -10%;
            clip-path: polygon(0% 0%, 100% 0%, 100% 30%, 0% 30%);
            animation: rotate 1s linear infinite;
        }

        @keyframes rotate {
            from {
                transform: rotatez(0deg);
            }

            to {
                transform: rotatez(360deg);
            }
        }
                      
                                       
To share this paste please copy this url and send to your friends
预览

评论

需要身份验证

您必须登录才能发表评论.

登录
    还没有评论.