代码看起来和视频中一样 ,但页面是一片空白。

来源:4-3 CSS样式

Ruil

2016-03-10 16:02

$toolbar-size: 52px;
@charset UTF-8;
.toolbar {
    position: fixed;
    left: 50%;
    bottom: 10px;
    margin-left: -$toolbar-size / 2;
}

.toolbar-item {
    position: relative;
    display: block;
    width: $toolbar-size;
    height: $toolbar-size;
    margin-top: 1px;
    
    &:hover {
        .toolbar-btn {
            &:before {
                top: -$toolbar-size;
            }
            &:after {
                top: 0;
            }
        }
        &:after {
            @include opacity(1);
            @include scale(1);
        }
    }
    &:after {
        content: "";
        position: absolute;
        right: -$toolbar-size - 5px;
        bottom: -10px;
        width: 172px;
        background-image: url(../img/toolbar_img.png);
        background-repeat: no-repeat;
        @include opacity(0);
        @include origin(95% 95%);
        @include scale(0.01);
        @include transition(all 1s);
    }
}

.toolbar-item-weixin {
    &:after {
        content: "";
        height: 212px;
        background-position: 0 0;
    }
    .toolbar-btn {
        &:before {
            content: "\e901";
        }
        &:after {
            content: "微信分享";
        }
    }
}

.toolbar-item-feedback {
    .toolbar-btn {
        &:before {
            content: "\e902";
        }
        &:after {
            content: "意见反馈";
        }
    }
}

.toolbar-item-app {
    &:after {
        content: "";
        height: 194px;
        background-position: 0 222px;
    }
    .toolbar-btn {
        &:before {
            content: "\e900";
        }
        &:after {
            content: "APP下载";
        }
    }
}

.toolbar-item-top {
    .toolbar-btn {
        &:before {
            content: "\e903";
        }
        &:after {
            content: "返回顶部";
        }
    }
}

.toolbar-btn {
    position: absolute;
    left: 0;
    top: 0;
    width: $toolbar-size;
    height: $toolbar-size;
    overflow: hidden;
    
    font-family: 'icomoon';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;

    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    &:before {  // icon
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: $toolbar-size;
        height: $toolbar-size;
        font-size: 30px;
        text-align: center;
        line-height: $toolbar-size;
        background-color: #d0d6d9;
        color: #fff;
        @include transition(top 1s);
    }
    &:after {   // text
        content: "";
        position: absolute;
        left: 0;
        top: $toolbar-size;
        width: $toolbar-size;
        height: $toolbar-size;
        font-size: 12px;
        padding-top: 12px;
        text-align: center;
        line-height: 1.2;
        background-color: #98a1a6;
        color: #fff;
        @include transition(top 1s);
    }
}

写回答 关注

3回答

  • 舒紫栋
    2016-03-13 22:42:10
    已采纳

    在浏览器开发者模式里看看,有没有被正确导入.

    穿迷彩的do...

    我跟你的情况一样,请问怎么看有没有被正确导入?谢谢

    2016-05-13 01:32:24

    共 2 条回复 >

  • qq_现实_0
    2016-07-27 22:56:56

    怎么解决这个问题?求解答,急

  • Ruil
    2016-03-14 09:59:58

    是汉字编译的问题。

侧栏工具条开发

带动画效果的工具条,掌握如何用CSS3完成简单的动画效果

68220 学习 · 317 问题

查看课程

相似问题