码迷,mamicode.com
首页 > 其他好文 > 详细

好看的按钮动画

时间:2016-06-06 20:19:37      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

准备一张透明图

实现效果

技术分享技术分享

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));
}

 

好看的按钮动画

标签:

原文地址:http://www.cnblogs.com/binmengxue/p/5564794.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!