Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

纯CSS实现描边飞入飞出


Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

 

忽然的想法,想写个纯CSS的飞入飞出效果

 

效果图:

 

 

html代码:

<style>
    * {
        padding: 0;
        margin: 0;
    }

    body {
        background: #f0f0f0;
        color: #000;
    }

    div {
        width: 240px;
        height: 60px;
        padding: 70px 30px;
        cursor: pointer;
        box-shadow: 0 15px 10px #ddd;
        background: #fff;
        position: absolute;
        z-index: 10;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        transition: 1s all linear;
    }

    div:hover {
        top: -50px;
    }

    i {
        display: block;
        height: 5px;
        background: #000;
        width: 0;
        position: absolute;
        z-index: 10;
        top: 0;
    }

    i.i01 {
        transition: 0;
        left: 0;
    }

    div:hover i.i01 {
        width: 100%;
        transition: 0.5s all linear;
    }

    i.i02 {
        transition: 0.5s all linear;
        right: 0;
    }

    div:hover i.i02 {
        width: 100%;
        transition: 0s all 0.5s linear;
    }

    i.i03 {
        width: 100%;
        left: 0;
        background: #f90;
        z-index: 5;
    }

    span {
        display: block;
        width: 100%;
        line-height: 30px;
    }

    .title {
        font-size: 24px;
    }

    .text {
        font-size: 14px;
        color: #999;
    }
    </style>
    <div>
        <i class="i01"></i>
        <i class="i02"></i>
        <i class="i03"></i>
        <span class="title">Just title</span>
        <span class="text">This is a text.</span>
    </div>

 

/www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42
  忽然的想法,想写个纯CSS的飞入飞出效果   效果图:     html代码: <style> * { padding: 0; margin: 0; } body { background: #f0f……" target="_blank">

D.Young

85后 / 代码散修 / 平面设计 / 一个老父亲 / 直男 / 被认为胖

相关推荐

发表评论

您的电子邮箱地址不会被公开。

微信扫一扫,分享到朋友圈

纯CSS实现描边飞入飞出
返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close