html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>太阳系探索与假想引爆</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #E0E0E0;
position: relative; /* For fixed button */
}
#solar-system {
position: relative;
width: 800px; /* Adjust as needed */
height: 800px; /* Adjust as needed */
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.sun {
width: 100px;
height: 100px;
background: radial-gradient(circle, #FFD700, #FFA500, #FF4500);
border-radius: 50%;
box-shadow: 0 0 50px #FFD700, 0 0 100px #FFA500;
position: absolute;
transition: all 0.5s ease-out; /* For explosion effect */
}
/* Explosion effect for Sun */
.sun.exploded {
width: 0;
height: 0;
opacity: 0;
box-shadow: 0 0 0 transparent; /* Remove glow */
}
.planet-orbit {
position: absolute;
border: 1px dashed rgba(255, 255, 255, 0.1);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
animation: orbit linear infinite;
}
.planet {
position: absolute;
border-radius: 50%;
top: 50%; /* Position planet at one end of the orbit's diameter */
left: 0;
transform: translate(-50%, -50%); /* Center the planet itself */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
transition: all 2s ease-out; /* For explosion effect */
}
/* Explosion effect for Planets */
.planet.exploded {
opacity: 0;
transform: translate(-50%, -50%) scale(0.1); /* Shrink and fade */
animation: none; /* Stop orbit animation */
transition: all 1s ease-out;
}
/* Planet sizes and colors */
#mercury-orbit { width: 150px; height: 150px; animation-duration: 8s; }
#mercury { background-color: #A0A0A0; width: 10px; height: 10px; }
#venus-orbit { width: 200px; height: 200px; animation-duration: 12s; }
#venus { background-color: #FFDAB9; width: 15px; height: 15px; }
#earth-orbit { width: 250px; height: 250px; animation-duration: 16s; }
#earth { background-color: #4682B4; width: 18px; height: 18px; }
#mars-orbit { width: 300px; height: 300px; animation-duration: 20s; }
#mars { background-color: #CD5C5C; width: 13px; height: 13px; }
#jupiter-orbit { width: 400px; height: 400px; animation-duration: 30s; }
#jupiter { background-color: #D2B48C; width: 45px; height: 45px; }
#saturn-orbit { width: 500px; height: 500px; animation-duration: 40s; }
#saturn { background-color: #F4A460; width: 38px; height: 38px; }
#uranus-orbit { width: 600px; height: 600px; animation-duration: 50s; }
#uranus { background-color: #AFEEEE; width: 25px; height: 25px; }
#neptune-orbit { width: 700px; height: 700px; animation-duration: 60s; }
#neptune { background-color: #6495ED; width: 23px; height: 23px; }
@keyframes orbit {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.planet-info {
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 5px 10px;
border-radius: 5px;
white-space: nowrap;
font-size: 0.8em;
pointer-events: none; /* Allow clicks to pass through */
opacity: 0;
transition: opacity 0.2s ease-in-out;
transform: translate(-50%, -150%); /* Position above planet */
}
.planet:hover .planet-info {
opacity: 1;
}
#explode-button {
padding: 15px 30px;
font-size: 1.2em;
background-color: #FF4500;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
box-shadow: 0 5px 15px rgba(255, 69, 0, 0.5);
transition: background-color 0.3s ease, transform 0.2s ease;
position: absolute;
bottom: 30px;
z-index: 100;
}
#explode-button:hover {
background-color: #FF6347;
transform: translateY(-3px);
}
#consequences {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, 0.85);
padding: 30px;
border-radius: 10px;
width: 70%;
max-width: 800px;
box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
text-align: left;
font-size: 1.1em;
line-height: 1.6;
z-index: 200;
display: none; /* Initially hidden */
overflow-y: auto; /* Allow scrolling for long text */
max-height: 90vh;
}
#consequences h2 {
color: #FFD700;
text-align: center;
margin-bottom: 20px;
}
#consequences ul {
list-style-type: disc;
margin-left: 20px;
}
#consequences li {
margin-bottom: 10px;
}
</style>
</head>
<body>
<div id="solar-system">
<div class="sun" id="sun"></div>
<!-- 水星 -->
<div class="planet-orbit" id="mercury-orbit">
<div class="planet" id="mercury">
<div class="planet-info">水星: 离太阳最近,地表多陨石坑</div>
</div>
</div>
<!-- 金星 -->
<div class="planet-orbit" id="venus-orbit">
<div class="planet" id="venus">
<div class="planet-info">金星: 温室效应严重,地表高温</div>
</div>
</div>
<!-- 地球 -->
<div class="planet-orbit" id="earth-orbit">
<div class="planet" id="earth">
<div class="planet-info">地球: 我们赖以生存的家园</div>
</div>
</div>
<!-- 火星 -->
<div class="planet-orbit" id="mars-orbit">
<div class="planet" id="mars">
<div class="planet-info">火星: 红色星球,可能存在液态水痕迹</div>
</div>
</div>
<!-- 木星 -->
<div class="planet-orbit" id="jupiter-orbit">
<div class="planet" id="jupiter">
<div class="planet-info">木星: 太阳系最大行星,巨型气态行星</div>
</div>
</div>
<!-- 土星 -->
<div class="planet-orbit" id="saturn-orbit">
<div class="planet" id="saturn">
<div class="planet-info">土星: 拥有壮观的行星环</div>
</div>
</div>
<!-- 天王星 -->
<div class="planet-orbit" id="uranus-orbit">
<div class="planet" id="uranus">
<div class="planet-info">天王星: 冰巨星,自转轴几乎与轨道面平行</div>
</div>
</div>
<!-- 海王星 -->
<div class="planet-orbit" id="neptune-orbit">
<div class="planet" id="neptune">
<div class="planet-info">海王星: 蓝色冰巨星,风速最快</div>
</div>
</div>
</div>
<button id="explode-button">引爆太阳</button>
<div id="consequences">
<h2>如果太阳被“引爆”...</h2>
<p>(注意:太阳是一颗中等质量的恒星,其生命终结方式通常是膨胀为红巨星,然后坍缩成白矮星,而不是像超新星那样“爆炸”。这里是为了演示目的的假想情景。)</p>
<ul>
<li>
<strong>瞬间闪光与毁灭:</strong>
<p>太阳的“引爆”会释放出难以想象的巨大能量。在地球上,我们会在约8分钟后看到一道比核爆炸亮无数倍的闪光,接着便是毁灭性的伽马射线暴、X射线和紫外线辐射。这些高能辐射会瞬间穿透地球大气层,直接杀灭暴露在外的生命。</p>
</li>
<li>
<strong>行星的命运:</strong>
<ul>
<li><strong>内行星(水星、金星、地球、火星):</strong> 在伽马射线暴和高能粒子流的冲击下,这些行星的表面会瞬间汽化,大气层被剥离,地表物质被烤焦甚至熔化。引爆产生的冲击波和辐射压力可能将其从轨道上彻底推出,或直接汽化成气体和尘埃。</li>
<li><strong>外行星(木星、土星、天王星、海王星):</strong> 尽管距离较远,它们也会遭受巨大的能量冲击。气体巨行星的外层可能被剥离,冰巨星表面的冰层会被蒸发。它们的轨道会因太阳质量的急剧减少而变得极不稳定,最终被抛出太阳系,成为漫游宇宙的流浪行星。</li>
</ul>
</li>
<li>
<strong>引力失衡与宇宙流浪:</strong>
<p>太阳是太阳系绝大部分质量的来源。一旦它“引爆”,质量会迅速减少甚至消失,维系着所有行星轨道的引力将不复存在。所有行星、小行星和彗星都将不再受太阳束缚,以原有的惯性速度飞向深空,成为“流浪天体”。它们可能在宇宙中漂泊数十亿年,直到被其他星体的引力捕获,或永远孤寂地前进。</p>
</li>
<li>
<strong>生命彻底终结:</strong>
<p>地球上的生命,无论是表面还是地底深处,都无法幸免。瞬间的高能辐射会摧毁所有分子结构,而没有了太阳的能量供应,地球将迅速冷却,变成一个冰冷的、没有大气的岩石球。生物圈将彻底消失。</p>
</li>
<li>
<strong>太阳系残骸:</strong>
<p>“引爆”后,太阳原有的位置可能只剩下超新星爆发的残骸(如果它足够大能发生超新星)或一个白矮星/中子星(取决于假设的爆炸方式和质量)。周围的空间将被各种高能粒子和冲击波清扫干净,留下一个空虚、危险且毫无生机的区域。</p>
</li>
</ul>
<p>简而言之,如果太阳被“引爆”,那将是太阳系及其所有生命彻底的、瞬间的终结。</p>
</div>
<script>
const sun = document.getElementById('sun');
const planets = document.querySelectorAll('.planet');
const explodeButton = document.getElementById('explode-button');
const consequencesDiv = document.getElementById('consequences');
const solarSystem = document.getElementById('solar-system');
explodeButton.addEventListener('click', () => {
// Disable the button to prevent multiple clicks
explodeButton.disabled = true;
explodeButton.textContent = "毁灭进行中...";
explodeButton.style.backgroundColor = "#8B0000";
// Sun explosion effect
sun.classList.add('exploded');
sun.style.animation = 'none'; // Stop any ongoing animation
// Planets explosion effect - staggering for visual impact
planets.forEach((planet, index) => {
const orbit = planet.parentElement;
setTimeout(() => {
planet.classList.add('exploded');
// For planets, ensure their orbit animation also stops
orbit.style.animation = 'none';
// Optional: Make planets fly off screen
planet.style.left = '1000px'; // Move off to the right
planet.style.top = '1000px'; // Move off to the bottom
planet.style.transform = 'scale(0.1) rotate(720deg)'; // Shrink and spin
}, index * 100); // Small delay for each planet
});
// Hide the solar system elements after a short delay
setTimeout(() => {
solarSystem.style.opacity = '0';
solarSystem.style.transition = 'opacity 1s ease-out';
}, planets.length * 100 + 500); // Wait for all planets to start moving
// Show the consequences text after a delay
setTimeout(() => {
consequencesDiv.style.display = 'block';
}, planets.length * 100 + 1500); // Show text after planets have largely disappeared
});
</script>
</body>
</html>