实现关键:

1.纯css实现心形图(如果使用图片则无需)

html代码:

 <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="heart"></div>
</body>
</html>

添加基本css:

 body{
background:#ccc;
}
.heart{
position:relative;
height:90px;
width:120px;
margin:150px auto;
}

实现爱心图1:

 .heart:before,
.heart:after{
content:"";
position:absolute;
width:60px;
height:80px;
top:; border-top: 10px #cf2e3b solid;
border-radius:50px 50px 0 0;
}
.heart:before{
left:60px;
background:#cf2e3b;
}
.heart:after{
background:#cf2e3b;
}

实现爱心图2,左半部份逆时针45度,右边顺时针45度

.heart:before,
.heart:after{
content:"";
position:absolute;
width:60px;
height:80px;
top:; border-top: 10px #cf2e3b solid;
border-radius:50px 50px 0 0;
}
.heart:before{
left:60px;
background:#cf2e3b; transform:rotate(-45deg);
transform-origin:0 100%;
}
.heart:after{
background:#cf2e3b; transform:rotate(45deg);
transform-origin:100% 100%;
}

2.心跳动画

.heart{
position:relative;
height:90px;
width:120px;
margin:150px auto; animation:beat 1.5s ease-out;
animation-iteration-count: infinite;
}
@keyframes beat{
0% { transform:scale(1); }
25% { transform:scale(0.9); }
50% { transform:scale(1.1); }
75% { transform:scale(1); }
100%{ transform:scale(1); }
}

运行结果:http://output.jsbin.com/nihizox

Heart Beat的更多相关文章

  1. 品牌营销:不要Beat,要逼格!

             品牌营销:不要Beat,要逼格! 奥美的创始人大卫·奥格威说,广告营销应当是"具有风度的推销产品".而当下的营销手段,"风度"早已被抛之脑后, ...

  2. heart beat/心跳包

    为什么需要heart beat/心跳包?因为tcp keep-alive不能满足人们的实时性的要求,就是这么简单. socket的长时间连接的话,是需要心跳包.心跳包就是维持双方的连接,每隔一段时间发 ...

  3. DFS HDOJ 2614 Beat

    题目传送门 /* 题意:处理完i问题后去处理j问题,要满足a[i][j] <= a[j][k],问最多能有多少问题可以解决 DFS简单题:以每次处理的问题作为过程(即行数),最多能解决n个问题, ...

  4. Beat the Spread![HDU1194]

    Beat the Spread! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  5. Beat It

    They Told Him他们告诉他: Don't You Ever Come Around Here “你胆敢再来? Don't Wanna See Your Face, 不想再见你, You Be ...

  6. Celery beat实现定时/轮询任务

    Celery定时任务 配置 启用Celery的定时任务需要设置CELERYBEAT_SCHEDULE .  Celery的定时任务都由celery beat来进行调度.celery beat默认按照s ...

  7. windows中执行celery beat任务

    由于最新的celery4.2不支持windows系统,因此按照网上的建议安装了3.1.25版.按照官网的说明使用 app.conf.beat_schedule = { 'add-every-30-se ...

  8. ZOJ2388 Beat the Spread! 2017-04-16 19:18 91人阅读 评论(0) 收藏

    Beat the Spread! Time Limit: 2 Seconds      Memory Limit: 65536 KB Superbowl Sunday is nearly here. ...

  9. Android Studio Beat版公布!

    Android Studio Beat版公布了! 速度比0.61快爆了,有木有! L也能更新了,炫爆了,有木有!

  10. django 异步任务实现及Celery beat实现定时/轮询任务

    Celery定时任务 requirements celery==3.1.25 异步任务 django-celery==3.2.2 定时任务管理包 redis==2.10.6 django-redis- ...

随机推荐

  1. HiWorkV1.3版震撼公布,今日起正式公开測试!

    今天HiWork迎来了公开測试和V1.3大版本号更迭,HiWork集成的机器人达到20种,未读消息提醒亦可从不同维度进行设置,不断变好真是件振奋人心的事儿呢. 在这个看重颜值(kan lian)的互联 ...

  2. Android签名机制之---签名验证过程具体解释

    一.前言 今天是元旦,也是Single Dog的嚎叫之日,仅仅能写博客来祛除寂寞了,今天我们继续来看一下Android中的签名机制的姊妹篇:Android中是怎样验证一个Apk的签名. 在前一篇文章中 ...

  3. 图像处理之基础---很好的一个快速比较两副图片是否相同的code 可用于公安鉴别

    转自Codeproject http://www.codeproject.com/dotnet/comparingimages.asp Public Enum CompareResult ciComp ...

  4. u-boot支持LCD显示(基于TQ2440)【转】

    本文转载自:http://www.cnblogs.com/pengdonglin137/p/4633877.html u-boot支持LCD显示(基于TQ2440)   阅读目录(Content) 平 ...

  5. YTU 2405: C语言习题 牛顿迭代法求根

    2405: C语言习题 牛顿迭代法求根 时间限制: 1 Sec  内存限制: 128 MB 提交: 562  解决: 317 题目描述 用牛顿迭代法求根.方程为ax3+bx2+cx+d=0.系数a,b ...

  6. bash: crontab: command not found

    操作步骤 1. 确认crontab是否安装: 执行 crontab 命令如果报 command not found,就表明没有安装 2. 安装 crontab 执行 yum install -y vi ...

  7. 《C-RNN-GAN: Continuous recurrent neural networks with adversarial training》论文笔记

    出处:arXiv: Artificial Intelligence, 2016(一年了还没中吗?) Motivation 使用GAN+RNN来处理continuous sequential data, ...

  8. 《Deep Learning Face Attributes in the Wild》论文笔记

    论文背景: IEEE International Conference on Computer Vision 2015 Ziwei Liu1, Ping Luo1, Xiaogang Wang2, X ...

  9. python3.6 + selenium2.53.1 查询数据库并将返回的内容中每一行的内容转换成class对象

    环境: win10 python3.6 selenium2.53.1 准备工作:先安装pymysql python2.x链接数据库使用MySQLdb,而python3.x链接数据库使用pymysql ...

  10. Codeforces Round #386 (Div. 2)G. New Roads [构造][树]

    题目链接:G. New Roads 题意:给出n个结点,t层深度,每层有a[i]个结点,总共有k个叶子结点,构造一棵树. 分析: 考虑一颗树,如果满足每层深度上有a[i]结点,最多能有多少叶子结点 那 ...