zoukankan      html  css  js  c++  java
  • CSS3 彩色渐变动效按钮

    <!DOCTYPE html>
    <html>
    <head>
    <title>Crayon Animate</title>
    <style type="text/css">
    body {
        background-color: #747474;
    }
    .yam-don-button {
        width: 300px;
        margin-top: 100px!important;
    }
    .yam-don-button {
        position: relative;
        display: block;
        background: #fff;
        border: none;
        border-radius: 100px;
        box-shadow: 0 24px 50px -20px rgba(0,0,0,.5);
        margin: 15px auto 0;
        min-width: 250px;
        line-height: 60px;
        font-size: 24px;
        text-decoration: none;
        text-align: center;
        vertical-align: middle;
        color: #fff;
        white-space: wrap;
        z-index: 2;
        cursor: pointer;
    }
    .yam-don-heart {
        position: relative;
        vertical-align: top;
        z-index: 1;
        display: inline-block;
        margin-right: 15px;
        color: #fff;
        font-size: 33px;
        text-shadow: none;
    }
    .btn-sponsor-red .yam-don-heart:before {
        background: linear-gradient(90deg,#f36,#61c2f0,#f441a5,#ffeb3b,#f36);
        background-size: 500%;
        content: "";
        position: absolute;
        top: 15px;
        left: -3px;
        right: 0;
        bottom: 15px;
        z-index: -1;
        filter: blur(10px);
        animation: crayonAnimate 28s linear infinite;
    }
    .yam-don-button:before {
        display: block;
        background: linear-gradient(90deg,#f36,#61c2f0,#f441a5,#ffeb3b,#f36);
        background-size: 500%;
        border-radius: 100px;
        content: "";
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        z-index: -1;
        opacity: .8;
        filter: blur(10px);
        animation: crayonAnimate 28s linear infinite;
        transition: all .35s;
    }
    .btn-sponsor-blue:before {
        background: linear-gradient(90deg,#00a2e4,#a7cd6b,#00a2e4,#a7cd6b,#00a2e4);
        background-size: 500%;
    }
    .yam-don-button:hover:before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        opacity: 1;
        animation: crayonAnimate 8s linear infinite;
    }
    @keyframes crayonAnimate {
        from {background-position:0}
        to {background-position:500%}
    }
    </style>
    </head>
    <body>
    <a href="#" class="yam-don-button btn-sponsor-blue" target="_blank">
        <span class="yam-don-heart"></span>立即点赞
    </a>
    <a href="#" class="yam-don-button btn-sponsor-red" target="_blank">
        <span class="yam-don-heart"></span>立即点赞
    </a>
    </body>
    </html>
  • 相关阅读:
    Linux查看日志常用命令
    linux(centos)下安装PHP的PDO扩展
    TP thinkphp 权限管理 权限认证 功能
    mysql优化(三)–explain分析sql语句执行效率
    阿里云服务器Centos7成为挖矿肉鸡被挖矿imWBR1耗尽CPU
    Asp.net导入Excel并读取数据
    定义显式类型转换和隐式类型转换
    C# 对象与引用变量
    C# ref参数
    C# 字段与属性的区别
  • 原文地址:https://www.cnblogs.com/universe-cosmo/p/10997576.html
Copyright © 2011-2022 走看看