欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基于 CSS 動(dòng)畫的 SVG 按鈕實(shí)例代碼

  發(fā)布時(shí)間:2018-10-12 14:11:32   作者:佚名   我要評論
本文通過實(shí)例代碼給大家介紹了基于 CSS 動(dòng)畫的 SVG 按鈕的實(shí)現(xiàn)方法,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧

具體代碼如下所示:

<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;
        }
    }
}

總結(jié)

以上所述是小編給大家介紹的基于 CSS 動(dòng)畫的 SVG 按鈕,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評論