发表于: 2019-12-17 21:01:37

1 991


今天把任务12的图一完成了

还差一个侧边栏

用了sass语言之后代码真的简洁了不少

比之前少了几十行代码

找一个列侧边栏的代码

改个样式看能不能用在我的网页里

而且这次重写感觉比做任务的时候进度快了很多


<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

    <title>CSS3隐藏悬浮网站左侧标签式导航栏代码 </title>

    <style type="text/css">

        a:link,

        a:hover,

        a:visited,

        a:active {

            color: #fff;

            text-decoration: none;

        }

        body {

            height: 100%;

            width: 100%;

            margin: 0;

            padding: 0;

            background: #fff;

        }

        .card-holder {

            position: fixed;

            width: 0px;

            overflow: visible;

            right: 0px;

        }

        .card-wrapper {

            display: inline-block;

            float: right;

            clear: both;

        }

        .card {

            position: relative;

            left: 100px;

            padding: 7px 32px 7px 64px;

            margin-top: 15px;

            x-box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.5);

            box-shadow: 8px 0 8px -8px rgba(0, 0, 0, 0.5);

            background: #fff;

            transition: all 0.3s ease-in-out 0.1s;

            border-radius: 5px;

        }

        .card:hover {

            position: relative;

            left: 100%;

            margin-left: -100px;

            box-shadow: 0 -8px 8px -8px rgba(0, 0, 0, 0.5),

            0 8px 8px -8px rgba(0, 0, 0, 0.5);

            transition: all 0.3s ease-in-out;

        }

        .card-content {

            display: inline-block;

            color: #fff;

            font-family: 'Droid Sans', sans-serif;

            font-size: 16px;

            font-weight: bold;

            white-space: nowrap;

            position: relative;

            left: -15px;

        }

        .bg-01 {

            background: #977e78;

        }

    </style>

</head>

<body>

    <div class='card-holder'>

        <div class='card-wrapper'>

            <a href='#'>

                <div class='card bg-01'>

                    <span class='card-content'>更多</span>

                </div>

            </a>

        </div>

    </div>

</body>

</html>




返回列表 返回列表
评论

    分享到