css心动的感觉demo效果示例(整理)

简介: css心动的感觉demo效果示例(整理)
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>跳动的心</title>
</head>
<style type="text/css">
    * {
    margin: 0;
    padding: 0;
}
body {
    /*background-color: #fa0000;*/
}
.big {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    animation: heartAnimation 0.7s linear 0s infinite;
}
.big .heart {
    margin: 5px 0;
    width: 100%;
    height: 100%;
    background-color: #ff1515;
    position: absolute;
}
.left,.right {
    border-radius: 100px 100px 0 0;  /*左上 右上 右下 左下*/
    box-shadow: 0px 0px 20px #FD0707;
}
.bottom {
    box-shadow: 0px 0px 20px #FD0707;
}
.left {
    transform: translate(-50px,150px) rotate(-45deg);  /*translate()位移 rotate() 旋转角度*/
}
.right {
    transform: translate(50px,150px) rotate(45deg);
}
.bottom {
    transform: translate(0,214px) rotate(45deg) scale(.9,.9)  /*scale:定义 2D 缩放转换。*/
}
/*动画效果*/
@keyframes heartAnimation{
    form {
            transform: scale(0.9,0.9);
    }
    to {
            transform: scale(1.1,1.1);
    }
}
</style>
<body>
    <div class="big">
        <div class="left heart"></div>
        <div class="right heart"></div>
        <div class="bottom heart"></div>
    </div>
</body>
</html>

相关文章
|
9天前
|
XML 前端开发 数据格式
css示例
【4月更文挑战第23天】css示例
13 2
|
2月前
|
前端开发 内存技术
CSS动画示例(上一篇是CSS过渡…)
CSS动画示例(上一篇是CSS过渡…)
25 1
|
8月前
|
前端开发
css改input变输入框光标颜色demo效果示例(整理)
css改input变输入框光标颜色demo效果示例(整理)
|
15天前
|
前端开发
css的选择器,优先级和示例
css的选择器,优先级和示例
9 1
|
15天前
|
XML 前端开发 数据格式
关于CSS的一些讲解与示例
关于CSS的一些讲解与示例
13 1
|
29天前
|
前端开发
CSS简单示例
CSS简单示例。
18 7
|
2月前
|
前端开发
CSS3中的动画示例
CSS3中的动画示例
13 1
|
5月前
|
前端开发
css sprite 的优缺点,使用方法和示例
css sprite 的优缺点,使用方法和示例
32 1
|
8月前
|
前端开发
css设置数组最后2个没有下边框效果(demo)整理
css设置数组最后2个没有下边框效果(demo)整理
|
8月前
|
前端开发
css三角号旋转90度,上下移动动画效果demo效果(整理)
css三角号旋转90度,上下移动动画效果demo效果(整理)