CodeLive Pro
语言设置
简体中文 (中国)
繁體中文 (台灣)
English (USA)
Français (France)
Русский (Россия)
Bahasa Melayu (Malaysia)
编辑器
HTML
CSS
JavaScript
你好,世界!
这是一个功能强大的实时HTML编辑器
点击我
主题演示
实时预览
代码修改立即反映在预览窗格
主题切换
支持明亮/暗黑双主题模式
多语言支持
内置6种语言界面
/* 在这里输入CSS代码 */ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; padding: 30px; line-height: 1.6; max-width: 1000px; margin: 0 auto; background: linear-gradient(135deg, #f5f7fa, #e4e7eb); } .dark-theme body { background: linear-gradient(135deg, #1a1a2e, #16213e); } .hero { text-align: center; padding: 40px 20px; background: rgba(255, 255, 255, 0.9); border-radius: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1); margin-bottom: 40px; } .dark-theme .hero { background: rgba(30, 30, 45, 0.9); } .hero h1 { font-size: 2.8rem; color: #2c3e50; margin-bottom: 20px; background: linear-gradient(90deg, #3498db, #e74c3c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; padding-bottom: 15px; } .dark-theme .hero h1 { color: #e0e0e0; } .hero p { font-size: 1.2rem; color: #555; max-width: 700px; margin: 0 auto 30px; } .dark-theme .hero p { color: #bbb; } .buttons { display: flex; gap: 15px; justify-content: center; margin-top: 20px; } .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-top: 40px; } .feature { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); text-align: center; transition: transform 0.3s; } .dark-theme .feature { background: #1e1e2d; } .feature:hover { transform: translateY(-5px); } .feature i { font-size: 2.5rem; color: #3498db; margin-bottom: 15px; } .feature h3 { font-size: 1.4rem; margin-bottom: 12px; color: #2c3e50; } .dark-theme .feature h3 { color: #e0e0e0; } .feature p { color: #666; line-height: 1.5; } .dark-theme .feature p { color: #aaa; }
// 在这里输入JavaScript代码 function changeText() { const greetings = { 'zh': ["你好!", "欢迎使用编辑器!", "代码运行成功!", "再见!"], 'zh-TW': ["你好!", "歡迎使用編輯器!", "代碼運行成功!", "再見!"], 'en': ["Hello!", "Welcome to the editor!", "Code executed successfully!", "Goodbye!"], 'fr': ["Bonjour!", "Bienvenue dans l'éditeur!", "Code exécuté avec succès!", "Au revoir!"], 'ru': ["Привет!", "Добро пожаловать в редактор!", "Код успешно выполнен!", "До свидания!"], 'ms': ["Helo!", "Selamat datang di editor!", "Kod berjaya dilaksanakan!", "Selamat tinggal!"] }; const lang = currentUILanguage || 'zh'; const texts = greetings[lang] || greetings['en']; const randomIndex = Math.floor(Math.random() * texts.length); const greetingEl = document.getElementById('greeting'); greetingEl.textContent = texts[randomIndex]; greetingEl.classList.add('pulse'); setTimeout(() => { greetingEl.classList.remove('pulse'); }, 1500); } function showNotification(message, type) { const notification = document.getElementById('notification'); notification.innerHTML = `
${message}`; notification.className = `notification ${type}`; notification.classList.add('show'); setTimeout(() => { notification.classList.remove('show'); }, 3000); }
0
字符
明亮
主题
实时预览
实时更新
无错误