SOURCE

console 命令行工具 X clear

                    
>
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>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft Yahei", sans-serif;
        }
        body {
            background-color: #f4f7fa;
            color: #2c3e50;
            padding: 20px;
            line-height: 1.7;
        }
        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: #fff;
            border-radius: 16px;
            padding: 30px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.08);
        }
        h1 {
            text-align: center;
            color: #296296;
            margin-bottom:10px;
            font-size:28px;
        }
        .subtitle{
            text-align:center;
            color:#666;
            margin-bottom:30px;
        }
        .section{
            margin:30px 0;
            padding:20px;
            border-radius:12px;
            background:#f8fbff;
        }
        h2{
            color:#296296;
            margin-bottom:16px;
            font-size:22px;
        }
        .explain-box{
            background:#fff;
            padding:18px;
            border-left:4px solid #4088c8;
            border-radius:8px;
            margin-bottom:20px;
        }
        /* 案例切换按钮 */
        .case-btn-group{
            display:flex;
            gap:10px;
            flex-wrap:wrap;
            margin:16px 0;
        }
        .case-btn{
            padding:9px 16px;
            border:none;
            background:#4088c8;
            color:white;
            border-radius:8px;
            cursor:pointer;
            transition:0.3s;
        }
        .case-btn:hover{
            background:#296296;
        }
        .case-btn.active{
            background:#1c4a70;
        }
        .case-content{
            background:#fff;
            padding:20px;
            border-radius:10px;
            min-height:140px;
        }
        .case-item{
            display:none;
        }
        .case-item.show{
            display:block;
            animation: fade 0.4s;
        }
        @keyframes fade{
            from{opacity:0;transform:translateY(8px);}
            to{opacity:1;transform:translateY(0);}
        }
        /* 滑块交互:矛盾强弱演示 */
        .slide-wrap{
            margin-top:20px;
            padding:18px;
            background:#fff;
            border-radius:10px;
        }
        input[type="range"]{
            width:100%;
            margin:12px 0;
        }
        .show-value{
            display:flex;
            justify-content:space-between;
        }
        .demo-circle{
            display:flex;
            justify-content:center;
            gap:60px;
            margin:20px 0;
        }
        .circle{
            width:70px;
            height:70px;
            border-radius:50%;
            display:flex;
            align-items:center;
            justify-content:center;
            font-weight:bold;
            color:white;
            transition: all 0.4s;
        }
        .c1{background:#e74c3c;}
        .c2{background:#27ae60;}
        /* 自测答题模块 */
        .quiz-wrap{
            background:#fff;
            padding:20px;
            border-radius:10px;
        }
        .opt{
            display:block;
            margin:10px 0;
            padding:10px;
            border:1px solid #ddd;
            border-radius:8px;
            cursor:pointer;
        }
        .opt:hover{
            border-color:#4088c8;
        }
        .submit-btn{
            margin-top:14px;
            padding:10px 22px;
            border:none;
            background:#27ae60;
            color:#fff;
            border-radius:8px;
            cursor:pointer;
        }
        .answer-tip{
            margin-top:14px;
            font-weight:bold;
        }
        /* 个人独立思考板块 */
        .think-box{
            background:#fff8e8;
            border-left:4px solid #f39c12;
            padding:18px;
            border-radius:8px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>矛盾的同一性与斗争性 辩证关系</h1>
        <div class="subtitle">交互式马原学习网页 · 自主设计交互案例</div>

        <!-- 理论基础 -->
        <div class="section">
            <h2>一、核心理论梳理</h2>
            <div class="explain-box">
                <p><strong>✅ 矛盾同一性:</strong>矛盾双方相互依存、相互贯通,在一定条件下可以相互转化。一方的存在以另一方为前提,你离不开我、我离不开你。</p>
                <p><strong>✅ 矛盾斗争性:</strong>矛盾双方相互排斥、相互对立的属性。<span style="color:#c0392b">重点误区:斗争不等于打架、冲突!差异、竞争、制约都属于斗争性。</span></p>
                <p><strong>✅ 辩证关系:</strong>同一性和斗争性不能分割。斗争性寓于同一性之中;同一性制约斗争的形式、范围;二者共同推动事物发展。</p>
            </div>
        </div>

        <!-- 交互1:切换不同专业案例【你可以修改案例换成自己专业!】 -->
        <div class="section">
            <h2>二、案例切换(点击按钮切换)</h2>
            <div class="case-btn-group">
                <button class="case-btn active" data-id="case1">计算机/编程案例</button>
                <button class="case-btn" data-id="case2">生活案例:网课与线下课</button>
                <button class="case-btn" data-id="case3">生态案例:捕食者与猎物</button>
                <button class="case-btn" data-id="case4">学习案例:压力和动力</button>
            </div>
            <div class="case-content">
                <div class="case-item show" id="case1">
                    <strong>计算机专业:程序的bug与正常功能</strong>
                    <p>同一性:“正常运行”和“bug错误”互为参照。没有bug,我们就不需要调试、优化;没有正常功能,bug也失去定义。在版本迭代中,bug修复后,系统稳定性提升(矛盾转化)。</p>
                    <p>斗争性:bug会破坏程序逻辑,和稳定运行互相排斥;开发、测试的过程,就是不断和bug“斗争”的过程。</p>
                    <p>辩证:二者在同一个软件系统(同一体)里共存,这种对立推动版本不断更新迭代。</p>
                </div>
                <div class="case-item" id="case2">
                    <strong>案例:线上网课 & 线下课堂</strong>
                    <p>同一性:二者都是教学形式,互相补充。线上可以回放、线下侧重互动;条件变化时,二者可以互相转换(疫情时线下转线上)。</p>
                    <p>斗争性:各有短板,资源、时间上存在竞争,比如一堂课不能同时完全线上+线下。</p>
                </div>
                <div class="case-item" id="case3">
                    <strong>案例:狼(捕食者)与羊(猎物)</strong>
                    <p>同一性:狼离不开羊作为食物;羊依靠狼淘汰老弱病残,维持种群健康,二者共存于同一个生态系统。</p>
                    <p>斗争性:狼捕食羊,二者相互排斥;这种对立维持生态平衡。</p>
                </div>
                <div class="case-item" id="case4">
                    <strong>案例:学习压力 & 学习动力</strong>
                    <p>同一性:没有压力就很难产生持续动力;完全没有动力,压力只会变成内耗。合适条件下,压力可以转化为前进动力。</p>
                    <p>斗争性:过大压力会压制动力,二者相互排斥。</p>
                </div>
            </div>
        </div>

        <!-- 交互2:拖动滑块演示矛盾强弱变化【原创交互】 -->
        <div class="section">
            <h2>三、交互演示:拖动滑块,观察矛盾变化</h2>
            <p>拖动滑块,调节矛盾斗争性强弱,观察两个矛盾主体的距离变化:距离越远代表对立越强;靠近代表同一性占主导。</p>
            <div class="slide-wrap">
                <div class="show-value">
                    <span>同一性主导 ←</span>
                    <span id="slideText">当前:平衡状态</span>
                    <span>→ 斗争性主导</span>
                </div>
                <input type="range" id="strengthSlider" min="0" max="100" value="50">
                <div class="demo-circle">
                    <div class="circle c1">A</div>
                    <div class="circle c2">B</div>
                </div>
                <p>理解:矛盾永远同时存在同一性+斗争性,只是某一方在不同阶段占优势,不会单独消失。</p>
            </div>
        </div>

        <!-- 交互3:随堂小测验 -->
        <div class="section">
            <h2>四、随堂小测(检验理解)</h2>
            <div class="quiz-wrap">
                <p>判断:矛盾的斗争性就是激烈的冲突、吵架对抗?()</p>
                <label class="opt"><input type="radio" name="q1" value="wrong"> A. 是,斗争就是激烈对抗</label>
                <label class="opt"><input type="radio" name="q1" value="right"> B. 错,差异、制约、竞争都属于斗争性</label>
                <button class="submit-btn" id="checkBtn">提交答案</button>
                <div class="answer-tip" id="tip"></div>
            </div>
        </div>

        <!-- 独立思考板块(满足作业“个人独立理解”要求) -->
        <div class="section">
            <h2>五、我的独立思考</h2>
            <div class="think-box">
                <p>很多人容易把矛盾理解成“坏事、冲突”,学习这个原理之后我意识到:矛盾是事物发展的内在动力,不是需要完全消灭的东西。</p>
                <p>同一性保证事物维持稳定、不会直接解体;斗争性推动变化突破现状。放到学习和专业里:代码的错误和稳定运行、压力和动力,都说明我们不需要追求完全“没有对立”,而是学会在对立统一中把握条件,推动事物向好的方向转化。</p>
                <p>我的感悟:矛盾双方不能割裂,只看到同一忽略竞争,或者只看到对立忽略依存,都是形而上学的片面思维。</p>
            </div>
        </div>
    </div>

    <script>
        // 交互1:案例切换
        const btns = document.querySelectorAll(".case-btn");
        const cases = document.querySelectorAll(".case-item");
        btns.forEach(btn=>{
            btn.onclick = ()=>{
                let targetId = btn.dataset.id;
                // 清除激活
                btns.forEach(b=>b.classList.remove("active"));
                cases.forEach(c=>c.classList.remove("show"));
                btn.classList.add("active");
                document.getElementById(targetId).classList.add("show");
            }
        })

        // 交互2:滑块拖动演示矛盾强弱
        const slider = document.getElementById("strengthSlider");
        const circle1 = document.querySelector(".c1");
        const circle2 = document.querySelector(".c2");
        const slideText = document.getElementById("slideText");
        slider.oninput = function(){
            let val = this.value;
            let gap = 60 + val*2.2;
            document.querySelector(".demo-circle").style.gap = gap + "px";
            if(val < 30){
                slideText.innerText = "当前:同一性占主导,双方依存紧密";
            }else if(val>70){
                slideText.innerText = "当前:斗争性占主导,对立排斥明显";
            }else{
                slideText.innerText = "当前:同一性与斗争性相对平衡";
            }
        }

        // 交互3:答题判断
        const checkBtn = document.getElementById("checkBtn");
        const tip = document.getElementById("tip");
        checkBtn.onclick = ()=>{
            let sel = document.querySelector('input[name="q1"]:checked');
            if(!sel){
                tip.innerText="请选择一个选项";
                tip.style.color="#e74c3c";
                return;
            }
            if(sel.value === "right"){
                tip.innerText="✅回答正确!斗争性包含一切相互排斥、差异,不止激烈冲突";
                tip.style.color="#27ae60";
            }else{
                tip.innerText="❌回答错误,斗争不等于激烈冲突,仔细看前面误区提示";
                tip.style.color="#e74c3c";
            }
        }
    </script>
</body>
</html>