这是使用CSS3制作的一个圆形按钮。效果看起来很简单,其实制作也非常的简单的,主要就是径向渐变的运用,以及@font-face实现的ICON效果,当然其中也离开不其他属性的点缀效果,比如说box-shadow制作的阴影,transition制作的动画效果等。 代码中所需要的fonts我已经以附件的形式上传了,下载下来,fonts目录和代码页面 平级,这样就没有问题了。不要放错位置哦 精美的圆形按钮效果<br>body {<br> margin-top:100px;<br> padding-left:100px;<br> <br>}<br><br>.demo {<br> width: 400px;<br> text-align: center;<br> margin:80px auto 0;<br>}<br>.button {<br> cursor:pointer;<br> position: relative;<br> font-size: 0;<br> width: 100px;<br> height: 100px;<br> text-align: center;<br> margin-right: 50px;<br> border-radius: 50%;<br> border:none;<br> box-shadow: 0 2px 5px rgba(0,0,0,.4);<br> background: -webkit-linear-gradient(top,#fff,#d5dbe1);<br> background: -moz-linear-gradient(top,#fff,#d5dbe1);<br> background: -ms-linear-gradient(top,#fff,#d5dbe1);<br> background: -o-linear-gradient(top,#fff,#d5dbe1);<br> linear-gradient(top,#fff,#d5dbe1);<br> -webkit-transition: all .13s ease-out;<br> -moz-transition: all .13s ease-out;<br> -o-transition: all .13s ease-out;<br> transition: all .13s ease-out;<br>}<br>.button:after {<br> display: inline-block;<br> font-family: 'icomoon';<br> font-size: 24px;<br> color: #bdc0c1;<br> content: attr(data-icon);<br> speak: none;<br> font-weight: normal;<br> -webkit-font-smoothing: antialiased;<br> width: 64px;<br> line-height: 64px;<br> margin: 10px;<br> border-radius: 32px;<br> border: 1px solid #efefef;<br> box-shadow: -1px 0 0 #dbdcdd,1px 0 0 #dbdcdd,0 1px 0 #d0d1d2,0 0 8px #fff;<br> background: -webkit-linear-gradient(top left,#fcfcfc 50%,#dfe4e8);<br>}<br>.button:first-child:after {<br> content: "\21";<br>}<br>.button:last-child:after {<br> content: "\25";<br>}<br>.button:hover:after {<br> color: #19a6e4;<br> box-shadow: 0 1px 3px #d7d8d9 inset;<br> background: -webkit-radial-gradient(#dbeef8 ,#f2f4f6 50%);<br>}<br>.button:active {<br> top: 3px;<br> box-shadow: 0 1px 3px #d7d8d9 inset;<br>}<br>@font-face {<br> font-family: 'icomoon';<br> url('fonts /icomoon.eot');<br> url('fonts /icomoon.eot?#iefix') format('embedded-opentype'),<br> url('fonts/icomoon.svg#icomoon') format('svg'),<br> url('fonts/icomoon.woff') format('woff'),<br> url('fonts/icomoon.ttf') format('truetype');<br> font-weight: normal;<br> font-style: normal;<br>}<br> twitter github <br>/*250*250,*/<br>var cpro_id = "u1089145";<br> <br>/*250*250,*/<br>var cpro_id = "u1089141";<br> <br>/*250*250,*/<br>var cpro_id = "u1086065";<br> <br>var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");<br>document.write(unescape("%3Cscript src=\'#\'" + _bdhmProtocol + "hm.baidu.com/h.js%3F177319b798978621f83845b12c86fa29' type='text/javascript'%3E%3C/script%3E"));<br>