<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<title>中秋月饼</title>
<style>
.mooncake {
width: 200px;
height: 200px;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, #FFD700, #FFA500);
box-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
position: relative;
overflow: hidden;
margin: 50px auto;
transition: all 0.3s ease;
}
.filling {
width: 120px;
height: 120px;
border-radius: 50%;
background: radial-gradient(circle at 50% 50%, #FF4500, #FF8C00);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0.7;
animation: flow 5s infinite alternate;
}
.mooncake:hover {
transform: scale(1.05);
}
@keyframes flow {
0% {
transform: translate(-50%, -50%) scale(1);
}
100% {
transform: translate(-50%, -50%) scale(1.1);
}
}
</style>
</head>
<body>
<div class="mooncake">
<div class="filling"></div>
</div>
</body>
</html>下面是一个简单的 demo 片段:
中秋月饼 ,祝福大家中秋快乐!