Heart Beat
实现关键:
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的更多相关文章
- 品牌营销:不要Beat,要逼格!
品牌营销:不要Beat,要逼格! 奥美的创始人大卫·奥格威说,广告营销应当是"具有风度的推销产品".而当下的营销手段,"风度"早已被抛之脑后, ...
- heart beat/心跳包
为什么需要heart beat/心跳包?因为tcp keep-alive不能满足人们的实时性的要求,就是这么简单. socket的长时间连接的话,是需要心跳包.心跳包就是维持双方的连接,每隔一段时间发 ...
- DFS HDOJ 2614 Beat
题目传送门 /* 题意:处理完i问题后去处理j问题,要满足a[i][j] <= a[j][k],问最多能有多少问题可以解决 DFS简单题:以每次处理的问题作为过程(即行数),最多能解决n个问题, ...
- Beat the Spread![HDU1194]
Beat the Spread! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Beat It
They Told Him他们告诉他: Don't You Ever Come Around Here “你胆敢再来? Don't Wanna See Your Face, 不想再见你, You Be ...
- Celery beat实现定时/轮询任务
Celery定时任务 配置 启用Celery的定时任务需要设置CELERYBEAT_SCHEDULE . Celery的定时任务都由celery beat来进行调度.celery beat默认按照s ...
- windows中执行celery beat任务
由于最新的celery4.2不支持windows系统,因此按照网上的建议安装了3.1.25版.按照官网的说明使用 app.conf.beat_schedule = { 'add-every-30-se ...
- 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. ...
- Android Studio Beat版公布!
Android Studio Beat版公布了! 速度比0.61快爆了,有木有! L也能更新了,炫爆了,有木有!
- django 异步任务实现及Celery beat实现定时/轮询任务
Celery定时任务 requirements celery==3.1.25 异步任务 django-celery==3.2.2 定时任务管理包 redis==2.10.6 django-redis- ...
随机推荐
- int&boolean——Java和C的一点小差别
Java和C的差别非常多.只是预计这一点非常多人都不知道. 今天面试时碰到这么道C语言题 求执行结果 int x = -1; while(!x!=0){ cout<<x<<en ...
- Django项目开发-小技巧
当你开发完一个Django项目之后肯定要吧他丢到服务器让跑起来,但是你在自己的环境下安装了好多的包,是不是在服务器中也要一个个的安装了, pip freeze > read.txt #这条命令会 ...
- Mac Chrome-点击书签页在新的标签打开之方法
PS:一直使用的是Firefox,但是现在Firefox有些不能满足我现在的需求,所以下载了chrome.可是当使用chrome时发现有一个很实用的功能它不能设置,这个让我很抓狂. 当点击标签时不能新 ...
- Codeforces Round #310 (Div. 1) C. Case of Chocolate (线段树)
题目地址:传送门 这题尽管是DIV1的C. . 可是挺简单的. .仅仅要用线段树分别维护一下横着和竖着的值就能够了,先离散化再维护. 每次查找最大的最小值<=tmp的点,能够直接在线段树里搜,也 ...
- android.view.View
* This class represents the basic building block for user interface components. A View * occupies a ...
- C++ 函数部分(1)
1.编写一个求X的n次方的函数 .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas ...
- java抛出异常后,后续代码是否可继续执行
参考:https://www.cnblogs.com/wangyingli/p/5912269.html 仅此可正常执行异常后内容 try{ throw new Exception("参数越 ...
- [TJOI2016&HEOI2016] 排序
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=4552 [算法] 首先 , 二分答案x , 将比x小的数看作1,比x大的数看作0 然后 ...
- AutoIT: 通过页面抓取来陈列任务管理器里面所有进程的列表
#include<Array.au3> $handle =WinGetHandle("Windows 任务管理器") ;$ctrl =ControlGetHandle( ...
- Java-Runoob-高级教程-实例-字符串:09. Java 实例 - 字符串小写转大写
ylbtech-Java-Runoob-高级教程-实例-字符串:09. Java 实例 - 字符串小写转大写 1.返回顶部 1. Java 实例 - 字符串小写转大写 Java 实例 以下实例使用了 ...