console
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>乐高别墅展示页面</title>
<link rel="stylesheet" href="styles.css">
<link id="i"rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==">
<style>
#i {
background-color: black;
color: white;
font-size: 36px;
padding: 10px;
text-align: center;
border-radius: 5px;
}
</style>
</head>
<body>
<div id="cover" class="envelope">
<div class="envelope-flap" id="envelopeFlap"></div>
<div class="envelope-button" id="envelopeButton"></div>
<h1>乐高别墅</h1>
</div>
<div id="directButtons" style="display: none;">
<button id="section1Button">内容一</button>
<button id="section2Button">内容二</button>
<button id="section3Button">内容三</button>
</div>
<div class="content-section" id="section1" style="display: none;">
<h2>内容部分一</h2>
<div class="content-container">
<p>这是乐高别墅内容部分一的描述。</p>
<img src="your_image.jpg" alt="乐高别墅图片" style="width: 300px; height: auto;">
</div>
</div>
<div class="content-section" id="section2" style="display: none;">
<h2>内容部分二</h2>
<div class="content-container">
<p>这是乐高别墅内容部分二的描述。</p>
<img src="your_image.jpg" alt="乐高别墅图片" style="width: 300px; height: auto;">
</div>
</div>
<div class="content-section" id="section3" style="display: none;">
<h2>内容部分三</h2>
<div class="content-container">
<p>这是乐高别墅内容部分三的描述。</p>
<img src="your_image.jpg" alt="乐高别墅图片" style="width: 300px; height: auto;">
</div>
</div>
<script>
const envelopeButton = document.getElementById('envelopeButton');
const envelopeFlap = document.getElementById('envelopeFlap');
const section1Button = document.getElementById('section1Button');
const section2Button = document.getElementById('section2Button');
const section3Button = document.getElementById('section3Button');
const directButtons = document.getElementById('directButtons');
const sections = document.querySelectorAll('.content-section');
envelopeButton.addEventListener('click', function () {
envelopeFlap.style.transform = 'rotateX(180deg)';
setTimeout(() => {
document.getElementById('cover').style.display = 'none';
directButtons.style.display = 'block';
}, 500);
});
section1Button.addEventListener('click', function () {
sections.forEach(section => section.style.display = 'none');
document.getElementById('section1').style.display = 'block';
});
section2Button.addEventListener('click', function () {
sections.forEach(section => section.style.display = 'none');
document.getElementById('section2').style.display = 'block';
});
section3Button.addEventListener('click', function () {
sections.forEach(section => section.style.display = 'none');
document.getElementById('section3').style.display = 'block';
});
</script>
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #0099ff, #ff66cc);
background-size: 400% 400%;
animation: gradientAnimation 10s ease infinite;
}
@keyframes gradientAnimation {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.envelope {
text-align: center;
padding: 100px 0;
width: 80%;
position: relative;
perspective: 1000px;
z-index: 1;
background: linear-gradient(45deg, #ffffff, #e0e0e0);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.envelope-flap {
width: 200px;
height: 100px;
background-color: #f4f4f4;
position: absolute;
top: 0;
left: 50%;
transform-origin: bottom center;
transform: rotateX(0deg);
transition: all 1s;
border-bottom-left-radius: 50% 100px;
border-bottom-right-radius: 50% 100px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.envelope-button {
width: 40px;
height: 40px;
background-color: #007BFF;
border-radius: 50%;
position: absolute;
top: 80px;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
#directButtons {
margin-bottom: 20px;
}
#directButtons button {
padding: 10px 20px;
font-size: 16px;
margin: 0 10px;
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
}
.content-section {
padding: 50px;
display: none;
width: 80%;
text-align: center;
position: relative;
z-index: 2;
background: linear-gradient(135deg, #ffcc99, #ff99cc);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.content-container {
text-align: left;
}