css+html怎么实现SkeletonScreen加载占位图动画效果-创新互联

这篇文章将为大家详细讲解有关css+html怎么实现Skeleton Screen加载占位图动画效果,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

成都网站建设公司更懂你!创新互联建站只做搜索引擎喜欢的网站!成都网站制作前台采用搜索引擎认可的DIV+CSS架构,全站HTML静态,H5页面制作+CSS3网站,提供:网站建设,微信开发,小程序开发,成都做商城网站成都App定制开发,国际域名空间,服务器租售,网站代托管运营,微信公众号代托管运营。

效果

自上而下渐隐渐现

css+html怎么实现Skeleton Screen加载占位图动画效果

源码

html,用的angular语法,只要做简单的修改就可以成为你需要的语法

<div *ngFor="let item of [1,1,1],index as index" class="skeletonItem anim-opacity2 animation-delay{{index}}">
        <div class="skeletonText "></div>
        <div class="skeletonText" style="width:70%"></div>
        <div class="skeletonText" style="width:40%"></div>
      </div>

css

.skeletonItem {
      padding: 16px;
      border-bottom: 3px solid #eee;
    }

    .skeletonText {
      height: 16px;
      background: #e2e2e2;
      margin-top: 12px;
      border-radius: 4px;
    }

    .skeletonText:first-child {
      margin-top: 0;
    }
    .anim-opacity2 {
      animation: 1.5s opacity2 0s infinite;
    }
    .animation-delay0 {
      animation-delay: 0s;
    }
    .animation-delay1 {
      animation-delay: 0.5s;

    }
    .animation-delay2 {
      animation-delay: 1s;
    }

    @keyframes opacity2 {
      0% {
        opacity: 0.5
      }
      50% {
        opacity: 1;
      }
      100% {
        opacity: 0.5;
      }
    }

关于“css+html怎么实现Skeleton Screen加载占位图动画效果”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

本文标题:css+html怎么实现SkeletonScreen加载占位图动画效果-创新互联
浏览路径:https://www.cdcxhl.com/article6/ehoog.html

成都网站建设公司_创新互联,为您提供响应式网站营销型网站建设动态网站关键词优化服务器托管软件开发

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都网站建设