实现关键:

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. for循环console输出结果的问题

    我想定时打印出一串数字,写好了如下代码 for (var i = 0; i < 5; i++) {   setTimeout(function () {     console.log(i); ...

  2. 嵌入式开发之davinci---dm8127 ipipe

    http://blog.csdn.net/dog0138/article/details/4212576 http://e2e.ti.com/support/dsp/davinci_digital_m ...

  3. 【iOS系列】-A server with the specified hostname could not be found.问题解决

    [iOS系列]-A server with the specified hostname could not be found.问题解决 Reveal 在iOS开发中可以方便查看界面的布局,较为方便的 ...

  4. 2016/04/29 ①cms分类 ② dede仿站制作 步骤 十个步骤 循环生成菜单 带子菜单的菜单 标签 栏目 栏目内容列表 内容图片列表

    cms 系统还有: phpcms     企业站 Xiaocms  织梦  企业站 wordpress (博客) Ecshop 商城 Ecmall 多用户 Discms 记账 方维 订餐 团购 CMS ...

  5. iOS开发——高级篇——多线程dispatch_apply

    我们知道遍历数组是一个相对耗时的操作,而同时手机的核是越来越多,所以我们需要充分利用iOS多核的作用. 特别是在遍历操作中还有其他耗时操作.像我们平时直接遍历数组的操作 ,i< ,i++){ / ...

  6. File to byte[] in Java

    File to byte[] in Java - Stack Overflow https://stackoverflow.com/questions/858980/file-to-byte-in-j ...

  7. Masonry 动画更新约束

    前言 说到iOS自动布局,有很多的解决办法.有的人使用xib/storyboard自动布局,也有人使用frame来适配.对于前者,笔者并不喜欢,也不支持.对于后者,更是麻烦,到处计算高度.宽度等,千万 ...

  8. python调用window dll和linux so例子

    #!/usr/bin/python# -*- coding: UTF-8 -*-#python dll.pyimport win32api# 打开记事本程序,在后台运行,即显示记事本程序的窗口win3 ...

  9. bzoj1861 [Zjoi2006]Book 书架——splay

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1861 发现自己想splay的时候总是纠结那个点权是什么,因为splay原本是二分查找树... ...

  10. ObjectInputStream与ObjectOutputStream类实现对象的存取

    1. ObjectInputStream与ObjectOutputStream类所读写的对象必须实现Serializable接口,对象中的transient和static类型成员变量不会被读取和写入 ...