<!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 {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f4f7f6;
color: #333;
max-width: 900px;
margin: 0 auto;
padding: 20px;
}
h1 {
text-align: center;
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
margin-bottom: 30px;
}
.container {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
padding: 30px;
margin-bottom: 30px;
}
h2 {
margin-top: 0;
color: #2c3e50;
}
.intro {
background-color: #e8f4f8;
padding: 10px 15px;
border-left: 4px solid #3498db;
border-radius: 4px;
margin-bottom: 20px;
}
.demo-box {
min-height: 150px;
display: flex;
align-items: center;
justify-content: center;
background: #ecf0f1;
border-radius: 6px;
margin: 20px 0;
font-size: 26px;
font-family: 'Courier New', Courier, monospace;
font-weight: bold;
letter-spacing: 1px;
position: relative;
}
.btn-group {
display: flex;
justify-content: center;
gap: 15px;
margin-top: 20px;
}
button {
padding: 10px 24px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
border: none;
border-radius: 6px;
background-color: #3498db;
color: white;
transition: background 0.3s, transform 0.1s;
}
button:hover:not(:disabled) {
background-color: #2980b9;
transform: translateY(-1px);
}
button:active:not(:disabled) {
transform: translateY(1px);
}
button:disabled {
background-color: #bdc3c7;
cursor: not-allowed;
}
.highlight-red { color: #e74c3c; }
.highlight-blue { color: #2980b9; }
.highlight-green { color: #27ae60; }
.desc {
font-size: 16px;
line-height: 1.6;
color: #444;
text-align: center;
min-height: 60px;
padding: 10px;
background-color: #fdfdfd;
border: 1px dashed #ccc;
border-radius: 6px;
}
</style>
</head>
<body>
<h1>有机化学中的“迁移”机理对比</h1>
<div class="container">
<h2>1. 碳正离子重排 (1,2-甲基迁移)</h2>
<div class="intro">
<strong>条件:</strong>强酸催化、生成中间体、追求更稳定的碳正离子 (2° → 3°)。
</div>
<div class="demo-box" id="carbocation-display">
</div>
<div class="desc" id="carbocation-desc">
</div>
<div class="btn-group">
<button onclick="carboStep(1)" id="c-btn1" disabled>上一步</button>
<button onclick="carboStep(2)" id="c-btn2">下一步:发生迁移</button>
</div>
</div>
<div class="container">
<h2>2. 周环反应 (1,5-σ 氢迁移)</h2>
<div class="intro">
<strong>条件:</strong>加热 (Δ) 或光照、无中间体、单键与双键协同重排。
</div>
<div class="demo-box" id="sigma-display">
</div>
<div class="desc" id="sigma-desc">
</div>
<div class="btn-group">
<button onclick="sigmaStep(1)" id="s-btn1" disabled>上一步</button>
<button onclick="sigmaStep(2)" id="s-btn2">下一步:发生迁移</button>
</div>
</div>
<script>
// 碳正离子重排数据 (已修正第三步的质子去向)
const carboData = [
{
html: "CH<sub>3</sub>-<span class='highlight-red'>C</span>(<span class='highlight-green'>CH<sub>3</sub></span>)<sub>2</sub>-<span class='highlight-blue'>C<sup>+</sup></span>H-CH<sub>3</sub>",
text: "<strong>步骤 1 / 3 (起始):</strong> 羟基脱水后留下一个孤立的 仲(2°) 碳正离子(蓝色)。左边相邻的叔碳(红色)上连有两个甲基(绿色)。"
},
{
html: "CH<sub>3</sub>-<span class='highlight-red'>C<sup>+</sup></span>(<span class='highlight-green'>CH<sub>3</sub></span>)-<span class='highlight-blue'>CH</span>(<span class='highlight-green'>CH<sub>3</sub></span>)-CH<sub>3</sub>",
text: "<strong>步骤 2 / 3 (重排):</strong> 1,2-甲基迁移!绿色的甲基带着电子跳槽到了右边的蓝色碳上。正电荷随之转移到了左边的红色碳上,成功逆袭为更稳定的 叔(3°) 碳正离子。"
},
{
html: "CH<sub>3</sub>-<span class='highlight-red'>C</span>(<span class='highlight-green'>CH<sub>3</sub></span>)=<span class='highlight-blue'>C</span>(<span class='highlight-green'>CH<sub>3</sub></span>)-CH<sub>3</sub>",
text: "<strong>步骤 3 / 3 (产物):</strong> 消除反应!为了形成最稳定的多取代双键(扎伊采夫规则),溶液中的碱会拔去<strong>右侧蓝色碳</strong>上唯一的质子 (H<sup>+</sup>),成键电子折叠到中间,中和了红色碳的正电荷,生成双键。"
}
];
// 西格玛迁移数据
const sigmaData = [
{
html: "<span class='highlight-red'>H</span>-CH<sub>2</sub>-CH=CH-CH=CH<sub>2</sub>",
text: "<strong>步骤 1 / 3 (起始):</strong> 1,3-戊二烯。受热时分子碳链在空间弯曲,1号碳上的红色氢原子逐渐靠近双键末端的5号碳。"
},
{
html: "<span style='color:#7f8c8d'>[ <span class='highlight-red'>H</span> ·· CH<sub>2</sub> ·· CH ·· CH ·· CH ·· CH<sub>2</sub> ]<sup>‡</sup></span>",
text: "<strong>步骤 2 / 3 (过渡态):</strong> 协同过程!没有碳正离子产生。旧的 σ 键断裂与新的 σ 键生成同时进行,π 电子云像多米诺骨牌一样顺势推移。"
},
{
html: "CH<sub>2</sub>=CH-CH=CH-CH<sub>2</sub>-<span class='highlight-red'>H</span>",
text: "<strong>步骤 3 / 3 (产物):</strong> 1,5-σ 氢迁移完成。红色的氢原子成功“平移”到了分子另一端,原本的共轭双键位置全部顺移。"
}
];
let currentCarbo = 0;
let currentSigma = 0;
function updateCarbo() {
document.getElementById('carbocation-display').innerHTML = carboData[currentCarbo].html;
document.getElementById('carbocation-desc').innerHTML = carboData[currentCarbo].text;
document.getElementById('c-btn1').disabled = currentCarbo === 0;
document.getElementById('c-btn2').disabled = currentCarbo === 2;
}
function updateSigma() {
document.getElementById('sigma-display').innerHTML = sigmaData[currentSigma].html;
document.getElementById('sigma-desc').innerHTML = sigmaData[currentSigma].text;
document.getElementById('s-btn1').disabled = currentSigma === 0;
document.getElementById('s-btn2').disabled = currentSigma === 2;
}
function carboStep(dir) {
if (dir === 1 && currentCarbo > 0) currentCarbo--;
if (dir === 2 && currentCarbo < 2) currentCarbo++;
updateCarbo();
}
function sigmaStep(dir) {
if (dir === 1 && currentSigma > 0) currentSigma--;
if (dir === 2 && currentSigma < 2) currentSigma++;
updateSigma();
}
// 页面加载时初始化显示状态
window.onload = function() {
updateCarbo();
updateSigma();
};
</script>
</body>
</html>