zoukankan      html  css  js  c++  java
  • 好看的按钮动画

    准备一张透明图

    实现效果

    HTML

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CSS3 Animated Bubble Buttons | Tutorialzine Demo</title>
    
    <link rel="stylesheet" type="text/css" href="css/page.css" />
    <link rel="stylesheet" type="text/css" href="buttons/buttons.css" />
    
    </head>
    
    <body>
    
    <div id="buttonContainer">
        
        <a href="#" class="button big blue">Big Button</a>
        
    </div>
    <div style="margin:20px auto"><a href="#" class="button2">Big Button</a> </div>
       
    </body>
    </html>

    CSS样式

    .button{
        font:15px Calibri, Arial, sans-serif;
        text-shadow:1px 1px 0 rgba(255,255,255,0.4);
        text-decoration:none !important;
        white-space:nowrap;
        display:inline-block;
        vertical-align:baseline;
        position:relative;
        cursor:pointer;
        padding:10px 20px;
        background-repeat:no-repeat;
        background-position:bottom left;
        background-image:url('button_bg.png');
        background-position:bottom left, top right, 0 0, 0 0;
        background-clip:border-box;
        -moz-border-radius:8px;
        -webkit-border-radius:8px;
        border-radius:8px;    
        -moz-box-shadow:0 0 1px #fff inset;
        -webkit-box-shadow:0 0 1px #fff inset;
        box-shadow:0 0 1px #fff inset;
        -webkit-transition:background-position 1s;
        -moz-transition:background-position 1s;
        transition:background-position 1s;
    }
    .button:hover{
        background-position:top left;
        background-position:top left, bottom right, 0 0, 0 0;
    }
    .button.big{ font-size:30px;}
    .blue.button{
        color:#0f4b6d !important;
        border:1px solid #84acc3 !important;
        background-color: #48b5f2;
        background-image:url('button_bg.png'), url('button_bg.png'),
                        -moz-radial-gradient(    center bottom, circle,rgba(89,208,244,1) 0,rgba(89,208,244,0) 100px),
                        -moz-linear-gradient(#4fbbf7, #3faeeb);
    
        background-image:url('button_bg.png'), url('button_bg.png'),
                        -webkit-gradient(    radial, 50% 100%, 0, 50% 100%, 100,from(rgba(89,208,244,1)), to(rgba(89,208,244,0))),
                        -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4fbbf7), to(#3faeeb));
    }
    
    .blue.button:hover{
        background-color:#63c7fe;
        background-image:url('button_bg.png'), url('button_bg.png'),
                        -moz-radial-gradient(    center bottom, circle,rgba(109,217,250,1) 0,rgba(109,217,250,0) 100px),
                        -moz-linear-gradient(#63c7fe, #58bef7);                
        background-image:url('button_bg.png'), url('button_bg.png'),
                        -webkit-gradient(    radial, 50% 100%, 0, 50% 100%, 100,from(rgba(109,217,250,1)), to(rgba(109,217,250,0))),
                        -webkit-gradient(linear, 0% 0%, 0% 100%, from(#63c7fe), to(#58bef7));
    }
  • 相关阅读:
    星战代码小电影
    CDlinux 安装
    网络正常使用,图标状态显示不正常
    查询正在执行的SQL语句DBCCINPUTBUFFER
    如何在MYSQL下所有指定数据库名下执行SQL
    GHOST完成后出现GRUB解决方法
    MySql Cast与Convert函数
    MYSQL查询数据库表索引的硬盘空间占用
    警惕企业中的五种虚假执行力
    开启笔记本win7的虚拟热点笔记本变成wifi
  • 原文地址:https://www.cnblogs.com/binmengxue/p/5564794.html
Copyright © 2011-2022 走看看