<!DOCTYPE html>
<html>
<head>
	<title>动态炫彩心型</title>
	<style>
		#heart {
			position: relative;
			width: 100px;
			height: 90px;
			transform: rotate(-45deg);
			top: 50px;
			left: 50px;
			animation: pulse 2s infinite;
		}
		#heart:before,
		#heart:after {
			position: absolute;
			content: "";
			left: 50px;
			top: 0;
			width: 50px;
			height: 80px;
			background-color: #ff6b6b;
			border-radius: 50px 50px 0 0;
			transform: rotate(-45deg);
			transform-origin: 0 100%;
		}
		#heart:after {
			left: 0;
			transform: rotate(45deg);
			transform-origin: 100% 100%;
		}
		@keyframes pulse {
			0% {
				transform: scale(1);
			}
			50% {
				transform: scale(1.2);
			}
			100% {
				transform: scale(1);
			}
		}
	</style>
</head>
<body>
	<div id="heart"></div>
</body>
</html>

原文地址: https://www.cveoy.top/t/topic/1Cb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录