progressbutton实现不同样式带有进度的按钮点击动画效果代码

代码语言:html

所属分类:表单美化

代码描述:progressbutton实现不同样式带有进度的按钮点击动画效果代码

代码标签: 样式 带有 进度 按钮 点击 动画 效果

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

<!DOCTYPE html>

<html lang="en" >

<head>

    <meta charset="UTF-8" />

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

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



        body {
            color: #fff;
            font-family: 'Lato', Arial, sans-serif;
            background-color: #EFEFEF;
        }

        .clearfix:before,
        .clearfix:after {
            content: '';
            display: table;
        }

        .clearfix:after {
            clear: both;
        }

        a {
            color: #148544;
            text-decoration: none;
            outline: none;
        }

        a:hover, a:focus {
            color: #fff;
        }

        .container > header {
            margin: 0 auto 2em;
            padding: 2em;
            text-align: center;
            background: rgba(0,0,0,0.01);
        }

        .container > header h1 {
            font-size: 3.5em;
            line-height: 1.3;
            margin: 0;
            font-weight: 300;
        }

        .container > header span {
            display: block;
            font-size: 60%;
            color: #148544;
            padding: 0.3em 0 0.6em 0.1em;
        }

        .note {
            color: #85cd62;
        }

        /* To Navigation Style */
        .codrops-top {
            text-transform: uppercase;
            width: 100%;
            font-size: 0.69em;
            line-height: 2.2;
            font-weight: 700;
        }

        .codrops-top a {
            text-decoration: none;
            padding: 0 1em;
            letter-spacing: 0.1em;
            display: inline-block;
        }

        .codrops-top span.right {
            float: right;
        }

        .codrops-top span.right a {
            float: left;
            display: block;
        }

        .codrops-icon:before {
            font-family: 'codropsicons';
            margin: 0 4px;
            speak: none;
            font-style: normal;
            font-weight: normal;
            font-variant: normal;
            text-transform: none;
            line-height: 1;
            -webkit-font-smoothing: antialiased;
        }

        .codrops-icon-drop:before {
            content: "\e001";
        }

        .codrops-icon-prev:before {
            content: "\e004";
        }

        .wrapper {
            text-align: center;
            vertical-align: top;
        }

        section {
            position: relative;
            text-align: center;
            padding: 1em 1em 3em;
        }

        .wrapper section {
            display: inline-block;
            width: 300px;
        }

        section h2 {
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #148544;
            font-weight: 700;
            padding: 1em;
            font-size: 0.8em;
            -webkit-backface-visibility: hidden;
        }

        .related {
            font-size: 2em;
            font-weight: 300;
        }

@media screen and (max-width: 25em) {

            .container > header {
                font-size: 70%;
            }

            .related {
                font-size: 120%;
            }

            .codrops-icon span {
                display: none;
            }

        }
        *, *:after, *::before {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }

        /* General styles for all types of buttons */
        .progress-button {
            position: relative;
            display: inline-block;
            padding: 0 60px;
            outline: none;
            border: none;
            background: #1d9650;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 1em;
            line-height: 4;
        }

        .progress-button[disabled],
        .progress-button[disabled].state-loading {
            cursor: default;
        }

        .progress-button .content {
            position: relative;
            display: block;
        }

        .progress-button .content::before,
        .progress-button .content::after {
            position: absolute;
            right: 20px;
            color: #0e7138;
            font-family: "icomoon";
            opacity: 0;
            -webkit-transition: opacity 0.3s 0.3s;
            transition: opacity 0.3s 0.3s;
        }

        .progress-button .content::before {
            content: "\e600";
            /* Checkmark for success */
        }

        .progress-button .content::after {
            content: "\e601";
            /* Cross for error */
        }

        .progress-button.state-success .content::before,
        .progress-button.state-error .content::after {
            opacity: 1;
        }

        .notransition {
            .........完整代码请登录后点击上方下载按钮下载查看

网友评论0