css - 使用css3添加显示:block but with a delay

标签 css sass

想知道是否有办法添加display:block;内联,但有 3 秒的小延迟...没有 JS,使用 CSS(3) 内联样式

.janet-place{
    $width: 138;
    $height: 452;
    width: rcalc($width);
    margin-left: rcalc(50);
    margin-top:rcalc(31);
    padding:hcalc($height,$width)  0;
    display: block; // here after 3 seconds
    @include bkgrd_image('animation/gown.png');
    &.gown{ display: block; // here after 3 more seconds}
    &.janet{ background-image: url("../images/animation/janet.png");}
    background-size: 100%;
}

最佳答案

尝试相应地调整这段代码

.janet-place{
    $width: 138;
    $height: 452;
    width: rcalc($width);
    margin-left: rcalc(50);
    margin-top:rcalc(31);
    padding:hcalc($height,$width)  0;
    display: inline; // here after 3 seconds
    @include bkgrd_image('animation/gown.png');
    &.gown{ display: block; // here after 3 more seconds}
    &.janet{ background-image: url("../images/animation/janet.png");}
    background-size: 100%;

    -webkit-animation-name: example; /* Chrome, Safari, Opera */
    -webkit-animation-duration: 3s; /* Chrome, Safari, Opera */
    animation-name: example;
    animation-duration: 3s;
}


/* Chrome, Safari, Opera */
@-webkit-keyframes example {
    from {display: inline;}
    to {display: block;}
}

/* Standard syntax */
@keyframes example {
    from {display: inline;}
    to {display: block;}
}

关于css - 使用css3添加显示:block but with a delay,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30549054/

相关文章:

javascript - 使用removeClass() 和addClass() 删除类并将其添加到同一元素时,为什么转换不起作用?

javascript - 在按钮上单击将 div 内部 html 分配给输入字段值

css - Sass/Compass - 将十六进制、RGB 或命名颜色转换为 RGBA

angular - SassError : Can't find stylesheet to import. @use '~@angular/material' 作为垫子;

css - 较大设备上的 Ionic 3 Grid 无法按预期工作(希望我做错了)

css - 从 SCSS 变量值中减去?

css - 适合 Angular2 应用程序的 p-galleria primeNg 上的图像

html - 固定位置页脚中的流体宽度 block 元素链接

css - VueJS背景图像url找不到路径

html - 移动端垂直滚动