console
<!DOCTYPE html>
<html>
<head>
<style>
.gift-box {
position: relative;
width: 300px;
height: 300px;
margin: 100px auto;
cursor: pointer;
}
.box {
position: absolute;
width: 100%;
height: 100%;
background: #c0392b;
border-radius: 10px;
transition: all 0.3s ease;
}
.box::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.1);
border-radius: 10px;
}
.lid {
position: absolute;
width: 100%;
height: 100%;
background: #e74c3c;
transform-origin: bottom;
transition: all 0.3s ease;
border-radius: 10px;
z-index: 2;
}
.ribbon {
position: absolute;
width: 100%;
height: 100%;
}
.ribbon::before,
.ribbon::after {
content: '';
position: absolute;
background: #f1c40f;
z-index: 3;
}
.ribbon::before {
width: 100%;
height: 20px;
top: 50%;
transform: translateY(-50%);
}
.ribbon::after {
width: 20px;
height: 100%;
left: 50%;
transform: translateX(-50%);
}
.content {
position: absolute;
width: 100%;
height: 100%;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 1;
color: #fff;
text-align: center;
padding: 20px;
}
.gift-box:hover .lid {
transform: rotateX(-120deg);
}
.gift-box:hover .content {
display: flex;
}
.voucher {
font-size: 28px;
font-weight: bold;
margin: 10px 0;
font-family: Arial, sans-serif;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.brands {
font-size: 18px;
margin: 10px 0;
}
.note {
font-size: 12px;
color: #ddd;
margin-top: 15px;
}
</style>
</head>
<body>
<div class="gift-box">
<div class="box">
<div class="lid">
<div class="ribbon"></div>
</div>
<div class="content">
<div class="brands">华为 | OPPO | vivo | 小米等手机</div>
<div class="voucher">代金券 1500 元</div>
<div class="note">* 中考后领取 *</div>
<div class="note">* ·0· *</div>
</div>
</div>
</div>
</body>
</html>