Maison  >  Article  >  interface Web  >  6种炫酷的CSS3按钮边框动画特效_html/css_WEB-ITnose

6种炫酷的CSS3按钮边框动画特效_html/css_WEB-ITnose

WBOY
WBOYoriginal
2016-06-24 11:34:341155parcourir

这是一款效果非常炫酷的CSS3按钮边框动画特效。这组按钮边框动画共有6种不同的效果。当鼠标滑过按钮的时候,按钮的边框会以不同的方式进行各种动画,效果非常的炫酷。

在线预览    源码下载

 使用方法

 HTML结构

该CSS3按钮边框动画特效中的按钮使用HTML的

<button class="draw">draw</button>       

 CSS样式

在CSS样式中,首先为按钮设置一些基本样式,去掉原生按钮的样式。

button {  background: none;  border: 0;  box-sizing: border-box;  box-shadow: inset 0 0 0 2px #f45e61;  color: #f45e61;  font-size: inherit;  font-weight: 700;  margin: 1em;  padding: 1em 2em;  text-align: center;  text-transform: capitalize;  position: relative;  vertical-align: middle;}button::before, button::after {  box-sizing: border-box;  content: '';  position: absolute;  width: 100%;  height: 100%;}            

以上是第一种线条动画效果的制作方法。其它效果的CSS代码请参考下载文件。

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn