藤藤每日一练——CSS3 Button Pink

特别声明:小站对部分原创文章已开启付费阅读,并开通年费VIP通道,年费价格为 ¥365.00元。如果您喜欢小站的内容,可以点击开通会员进行全站阅读。如果您对付费阅读有任何建议或想法,欢迎发送邮件至: airenliao@gmail.com!(^_^)

藤藤每日一练——CSS3 Button Pink

今天这个案例是使用CSS3的常用属性制作的一个ICON圆开按钮效果,在这个案例中使用@font-face属性制作了三个浏览器的icon(chrom/firefox/ie),使用gradient制作的径向渐变效果,并且使用box-shadow实现立体效果,用text-shadow制作的icon发光效果,详细的可以看代码。

demodownload

HTML 结构

<button type="button" class="button"></button>
<button type="button" class="button"></button>
<button type="button" class="button"></button>

CSS代码

body{
  background-color: #d97398;
}
.controls_button{
  width: 400px;
  margin:40px auto;
}
.button{
  width: 70px;
  height: 70px;
  margin-right: 90px;
  border-radius: 35px;
  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(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -moz-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -ms-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -o-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: radial-gradient(top center, circle, #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(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -moz-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -ms-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: -o-radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
  background: radial-gradient(top center, circle, #f28fb8, #e982ad, #ec568c);
}
@font-face {
  font-family: 'icomoon';
  src:url('fonts/icomoon.eot');
  src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
	url('fonts/icomoon.svg#icomoon') format('svg'),
	url('fonts/icomoon.woff') format('woff'),
	url('fonts/icomoon.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

demodownload

如需转载,烦请注明出处:http://www.w3cplus.com/demo/css3-button-pink.html

jordan shoes for sale outlet white

如需转载,烦请注明出处:https://www.w3cplus.com/demo/479.html

如果文章中有不对之处,烦请各位大神拍正。如果你觉得这篇文章对你有所帮助,打个赏,让我有更大的动力去创作。(^_^)。看完了?还不过瘾?点击向作者提问!

赏杯咖啡,鼓励他创作更多优质内容!
返回顶部