css skeleton loading

css & :empty

See the Pen Skeleton Screen with CSS by xgqfrms
(@xgqfrms) on CodePen.

dom

https://www.italki.com/contacts/teacher/favorited

 <div class="teacher-card">
<div class="teacher-card-left">
<div class="teacher-card-detail-top">
<div class="teacher-card-avatar">
<div class="teacher-card-avatar-placeholder"></div>
</div>
<div class="teacher-card-information">
<div class="teacher-card-name-placerholder"></div>
<div class="teacher-card-type-placerholder"></div>
<div class="teacher-card-divider"></div>
<div class="teacher-card-small-head-placeholder"></div>
<div class="teacher-card-small-languages-placeholder"></div>
</div>
</div>
<div class="teacher-card-detail-bottom">
<div class="teacher-card-rating">
<div class="teacher-card-stars">
<div class="teacher-card-rating-placeholder"></div>
</div>
</div>
<div class="teacher-card-information">
<div class="teacher-card-small-head-placeholder"></div>
<div class="teacher-card-small-speaks-placeholder"></div>
<div class="teacher-card-rate">
<div class="teacher-card-hourly">
<div class="teacher-card-small-head-placeholder"></div>
<div class="teacher-card-small-hourly-placeholder"></div>
</div>
<div class="teacher-card-trial">
<div class="teacher-card-small-head-placeholder"></div>
<div class="teacher-card-small-hourly-placeholder"></div>
</div>
</div>
</div>
</div><i class="teacher-card-favorite"></i>
</div>
<div class="teacher-card-right">
<div class="teacher-card-tab-placeholder"></div>
</div>
</div>

@charset "UTf-8"; /* app.css */ :root {
--color: #000;
--default-color: green;
--new-color: #0f0;
} html{
font-size: 62.5%;
/* 10px = 1rem */
} * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
} html, body, div, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, object, code, legend, button, input, textarea, th, td, a, img, video {
margin: 0;
padding: 0;
border: 0;
outline: 0;
} *, :after, :before {
box-sizing: border-box;
} .teacher-card {
position: relative;
display: flex;
margin-bottom: 20px;
} @-webkit-keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
} 50% {
-webkit-transform: scale3d(1.0075,1.0075,1.0075);
transform: scale3d(1.0075,1.0075,1.0075)
} to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
} @keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
} 50% {
-webkit-transform: scale3d(1.0075,1.0075,1.0075);
transform: scale3d(1.0075,1.0075,1.0075)
} to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
} .teacher-card-left {
position: relative;
padding: 25px 25px 20px;
width: 564px;
min-height: 284px;
border-radius: 6px;
background: #fff;
box-shadow: 0 7px 25px 0 rgba(0,0,0,.1);
cursor: pointer
} .teacher-card-right {
padding: 25px 20px 20px;
width: 386px;
border-radius: 0 6px 6px 0;
background: #fff;
box-shadow: 5px 7px 25px 0 rgba(0,0,0,.1);
} .teacher-card-detail-bottom,
.teacher-card-detail-top {
display: flex;
} .teacher-card-avatar {
display: flex;
align-items: flex-start;
text-align: center;
} .teacher-card-avatar-placeholder,
.teacher-card-tab-placeholder {
background-image: -webkit-gradient(linear,right top,left top,from(#ccc),color-stop(0,#eee),color-stop(0,#ccc),to(#eee));
background-image: -webkit-linear-gradient(right,#ccc,#eee,#ccc 0,#eee);
background-image: linear-gradient(270deg,#ccc,#eee 0,#ccc 0,#eee);
} .teacher-card-avatar-placeholder {
margin: 0 auto;
width: 100px;
height: 100px;
border-radius: 50%;
box-shadow: 0 5px 15px 0 rgba(0,0,0,.2);
} .teacher-card-information {
margin-left: 30px;
flex: 1 1;
} .teacher-card-name-placerholder {
margin-bottom: 10px;
width: 170px;
height: 20px;
border-radius: 10px;
background-image: -webkit-gradient(linear,right top,left top,from(#ccc),color-stop(0,#eee),color-stop(0,#ccc),to(#eee));
background-image: -webkit-linear-gradient(right,#ccc,#eee,#ccc 0,#eee);
background-image: linear-gradient(270deg,#ccc,#eee 0,#ccc 0,#eee);
} .teacher-card-small-head-placeholder,
.teacher-card-type-placerholder {
height: 15px;
border-radius: 7.5px;
background-image: -webkit-gradient(linear,right top,left top,from(#ccc),color-stop(0,#eee),color-stop(0,#ccc),to(#eee));
background-image: -webkit-linear-gradient(right,#ccc,#eee,#ccc 0,#eee);
background-image: linear-gradient(270deg,#ccc,#eee 0,#ccc 0,#eee);
} .teacher-card-divider {
margin: 12px 0;
width: 15px;
height: 2px;
border-radius: 1px;
background: #ff4338;
} .teacher-card-small-head-placeholder {
margin-bottom: 10px;
width: 80px;
} .teacher-card-small-languages-placeholder,
.teacher-card-small-speaks-placeholder {
height: 20px;
border-radius: 10px;
background-image: -webkit-gradient(linear,right top,left top,from(#ccc),color-stop(0,#eee),color-stop(0,#ccc),to(#eee));
background-image: -webkit-linear-gradient(right,#ccc,#eee,#ccc 0,#eee);
background-image: linear-gradient(270deg,#ccc,#eee 0,#ccc 0,#eee);
} .newteacher-card-favorite,
.teacher-card-favorite {
position: absolute;
top: 25px;
right: 25px;
cursor: pointer;
}
.teacher-card-favorite {
width: 30px;
height: 30px;
background: url(heart-empty.96354e1f.svg) no-repeat 50%/30px 30px;
background: url(https://www.italki.com/static/media/heart-empty.96354e1f.svg) no-repeat 50%/30px 30px;
/* background: url(/static/media/heart-empty.96354e1f.svg) no-repeat 50%/30px 30px; */
} .teacher-card-right {
padding: 25px 20px 20px;
width: 386px;
border-radius: 0 6px 6px 0;
background: #fff;
box-shadow: 5px 7px 25px 0 rgba(0,0,0,.1);
} .teacher-card-tab-placeholder {
margin: 50px auto 0;
width: 343px;
height: 195px;
border-radius: 6px;
}

skeleton components

https://ant.design/components/skeleton-cn/

import { Skeleton, Button } from 'antd';

class Demo extends React.Component {
state = {
loading: false,
}; showSkeleton = () => {
this.setState({ loading: true });
setTimeout(() => {
this.setState({ loading: false });
}, 3000);
}; render() {
return (
<div className="article">
<Skeleton loading={this.state.loading}>
<div>
<h4>Ant Design, a design language</h4>
<p>
We supply a series of design principles, practical patterns and high quality design
resources (Sketch and Axure), to help people create their product prototypes
beautifully and efficiently.
</p>
</div>
</Skeleton>
<Button onClick={this.showSkeleton} disabled={this.state.loading}>
Show Skeleton
</Button>
</div>
);
}
} ReactDOM.render(<Demo />, mountNode);



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


css skeleton loading & skeleton components的更多相关文章

  1. 利用animation和text-shadow纯CSS实现loading点点点的效果

    经常在网上看到loading状态时的点点点的动态效果,自己也用JS写了一个,思路是使用一个计数参数,然后在需要添加点的元素后面利用setInterval一个一个加点,当计数到3时,把点变为一个--写完 ...

  2. 使用css实现loading的加载

    使用css实现loading的加载的效果图 html代码 <div id="caseVerteClaire"> <div id="transform&q ...

  3. 基于Vuejs实现 Skeleton Loading 骨架图

    原文地址:https://cloud.tencent.com/developer/article/1006169 https://mp.weixin.qq.com/s/qmyn6mGrO6hRKuvK ...

  4. 纯js+css实现loading等待效果

    此插件是基于jqueryUI的widget,下面是具体实现代码 第一部分css: /***loading***/ .loading-box{ position:absolute; text-align ...

  5. css 三彩loading

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title&g ...

  6. css动画 loading

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. 6种纯css实现loading效果

    1. <div id="loadingWrap1"> <span></span> <span></span> <s ...

  8. css skeleton & web app skeleton

    css skeleton & web app skeleton skeleton https://www.cnblogs.com/xgqfrms/p/10437258.html https:/ ...

  9. images & Skeleton

    images & Skeleton image placeholder & loading ... skeleton.css https://github.com/dhg/Skelet ...

随机推荐

  1. LOJ10096掠夺计划

    题目传送门:https://loj.ac/problem/10096 ----------------------------------------------------------------- ...

  2. 洛谷 P6362 平面欧几里得最小生成树

    题目描述 平面上有 \(n\) 个点,第 \(i\) 个点坐标为 \((x_i, y_i)\).连接 \(i, j\) 两点的边权为 \(\sqrt{(x_i - x_j) ^ 2 + (y_i - ...

  3. 【Oracle】SQL/92 执行多个表的连接

    内连接 外连接 自连接 交叉连接 1.内连接 表名 INNER JOIN 表名 ON 条件 等价于: FROM 表名, 表名 WHERE 条件 SELECT p.name, pt.name, pt.p ...

  4. KVM (虚拟机创建及管理,存储管理)

    创建KVM虚拟机 1.图形化界面创建 第一步:查看软件包组 yum grouplist 第二步:下载GUI界面的软件包组 yum groupinstall "Server with GUI& ...

  5. Joomla 3.4.6 RCE复现及分析

    出品|MS08067实验室(www.ms08067.com) 本文作者:whojoe(MS08067安全实验室SRST TEAM成员) 前言 前几天看了下PHP 反序列化字符逃逸学习,有大佬简化了一下 ...

  6. Java并发包源码学习系列:阻塞队列实现之LinkedBlockingDeque源码解析

    目录 LinkedBlockingDeque概述 类图结构及重要字段 linkFirst linkLast unlinkFirst unlinkLast unlink 总结 参考阅读 系列传送门: J ...

  7. Flink-v1.12官方网站翻译-P019-Generating Watermarks

    生成水印 在本节中,您将了解 Flink 提供的 API,用于处理事件时间时间戳和水印.关于事件时间.处理时间和摄取时间的介绍,请参考事件时间的介绍. 水印策略介绍 为了使用事件时间,Flink需要知 ...

  8. 【Java】构造方法

    成员变量声明时初始化和构造方法中初始化的区别 声明时为成员变量赋值,那每次创建这个类的对象都是同一个值. 构造方法初始化,每次创建对象时可以为每一个对象赋不同的值(此时要通过有参构造). 无返回值类型 ...

  9. The Preliminary Contest for ICPC Asia Shenyang 2019 D. Fish eating fruit(树形dp)

    题意:求一棵树上所有路径和模3分别为0 1 2 的权值的和 思路:树形dp 增加一个记录儿子节点满足条件的个数的数组 不要放在一起dp不然答案跟新会有问题 #include <bits/stdc ...

  10. Codeforces Round #671 (Div. 2)

    比赛链接:https://codeforces.com/contest/1419 A. Digit Game 题意 给出一个 $n$ 位数,游戏规则如下: 1-indexed Raze标记奇数位 Br ...