<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>CSS3径向渐变制作圆形图标按钮</title>
<style type="text/css">
body{
background-color: #282828;
background-image:
-webkit-radial-gradient(black 15%, transparent 16%),
-webkit-radial-gradient(black 15%, transparent 16%),
-webkit-radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%),
-webkit-radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%);
background-image:
radial-gradient(black 15%, transparent 16%),
radial-gradient(black 15%, transparent 16%),
radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%),
radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%);
background-position: 0 0px, 8px 8px, 0 1px, 8px 9px;
background-size: 16px 16px;
}
@font-face {
font-family: 'icomoon';
src:url('font/icomoon.eot');
src:url('font/icomoon.eot?#iefix') format('embedded-opentype'),
url('font/icomoon.svg#icomoon') format('svg'),
url('font/icomoon.woff') format('woff'),
url('font/icomoon.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.controls_button{
width: 400px;
margin:40px auto;
}
.button{
width: 70px;
height: 70px;
margin-right: 90px;
font-size:0;
border-radius: 50%;
border:none;
box-shadow:
0 1px 5px rgba(255,255,255,.5) inset,
0 -2px 5px rgba(0,0,0,.3) inset,
0 3px 8px rgba(0,0,0,.8);
background: -webkit-radial-gradient( circle at top center, #f28fb8, #e982ad, #ec568c);
background: radial-gradient(circle at top center, #f28fb8, #e982ad, #ec568c);
}
.button:nth-child(3){
margin-right: 0;
}
.button:after{
font-family: 'icomoon';
speak: none;
font-weight: normal;
-webkit-font-smoothing: antialiased;
font-size: 36px;
content: "\21";
color: #dd5183;
text-shadow:0 3px 10px #f1a2c1,0 -3px 10px #f1a2c1;
}
.button:nth-child(2):after{
content: "\22";
}
.button:nth-child(3):after{
content: "\23";
}
.button:hover:after{
color: #fff;
text-shadow:0 1px 20px #fccdda, 1px 0 14px #fccdda;
}
.button:active{
box-shadow:
0 2px 7px rgba(0,0,0,.5) inset,
0 -3px 10px rgba(0,0,0,.1) inset,
0 1px 3px rgba(255,255,255,.5);
background: -webkit-radial-gradient(circle at top center, #f28fb8, #e982ad, #ec568c);
background: radial-gradient(circle at top center, #f28fb8, #e982ad, #ec568c);
}
</style>
</head>
<body>
<div class="controls_button">
<button type="button" class="button">Chrome</button>
<button type="button" class="button">Firefox</button>
<button type="button" class="button">IE</button>
</div>
</body>
</html>
CSS3径向渐变制作圆形图标按钮
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 今天费了老大的劲用css画了个效果就是下图这种的按钮: 按钮样子上加上一个class(border-radiu...
- 最终效果: 一、首先我们来制作背景,径向渐变的颜色数值已给出,操作步骤略。 二、接下来我们制作主体部分,在画布中使...