<a href="#"> <svg> <rect></rect> </svg>Button </a>
body { margin: 0; padding: 0; background: #000; } a { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 60px; line-height: 60px; text-align: center; font-family: sans-serif; text-transform: uppercase; font-size: 24px; letter-spacing: 4px; color: #fff; text-decoration: none; } a svg, a svg rect { position: absolute; top: 0; left: 0; width: 100%; height: 100%; fill: transparent; } a { svg rect { stroke: #00e2ff; stroke-width: 4; transition: 2s; stroke-dasharray: 60 200; stroke-dashoffset: 320; } &:hover { svg rect { stroke: #ff0; stroke-dasharray: 200 60; stroke-dashoffset: 0; } } }
以上所述就是小编给大家介绍的《基于 CSS 动画的 SVG 按钮》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Introduction to Graph Theory
Douglas B. West / Prentice Hall / 2000-9-1 / USD 140.00
For undergraduate or graduate courses in Graph Theory in departments of mathematics or computer science. This text offers a comprehensive and coherent introduction to the fundamental topics of graph ......一起来看看 《Introduction to Graph Theory》 这本书的介绍吧!