以下是 css3泡泡动画按钮 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>css3泡泡动画按钮</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>
<a href="#" class="button big green">Big Button</a>
<a href="#" class="button big orange">Big Button</a>
<a href="#" class="button big gray">Big Button</a>
<a href="#" class="button blue medium">Medium Button</a>
<a href="#" class="button green medium">Medium Button</a>
<a href="#" class="button orange medium">Medium Button</a>
<a href="#" class="button gray medium">Medium Button</a>
<a href="#" class="button small blue">Small Button</a>
<a href="#" class="button small green">Small Button</a>
<a href="#" class="button small blue rounded">Rounded</a>
<a href="#" class="button small orange">Small Button</a>
<a href="#" class="button small gray">Small Button</a>
<a href="#" class="button small green rounded">Rounded</a>
</div>
</body>
</html>
CSS代码(page.css):
*{margin:0;padding:0;}
body{color:#eee;background:url('../img/page_bg.jpg') repeat-x #f3f3f3;font:15px Calibri,Arial,sans-serif;border-top:5px solid #212121;}
#buttonContainer{background:url('../img/section_bg.png');border:1px solid #F4F4F4;margin:120px auto 0;overflow:hidden;padding:20px 0 35px 45px;width:440px;-moz-box-shadow:0 0 10px #C4C4C4;-webkit-box-shadow:0 0 10px #C4C4C4;box-shadow:0 0 10px #C4C4C4;}
#buttonContainer a{float:left;margin:15px 15px 0 0;}