美文网首页前端
鼠标经过的时候,下划线动态从左往右展示出来

鼠标经过的时候,下划线动态从左往右展示出来

作者: 花花0825 | 来源:发表于2018-12-19 14:20 被阅读0次
第一块是鼠标没有经过的状态,第二块是鼠标经过时的状态

html:

<ul>

<li>hgh</li>

<li>hhhghtg</li>

</ul>

css:

.indexproducts .prolist li a:before {

            -webkit-transition: width .2s ease-in-out;

            transition: width .2s ease-in-out;

            left: 0;

            content: "";

            position: absolute;

            bottom: 0;

            width: 0;

            border-bottom: solid 3px #ff3a3a;

        }

    .indexproducts .prolist li a:hover:before {

        width: 100%;

    }

相关文章

网友评论

    本文标题:鼠标经过的时候,下划线动态从左往右展示出来

    本文链接:https://www.haomeiwen.com/subject/mnkjkqtx.html