code
HTML 코드 실행기
clear
초기화
play_arrow
실행
html
HTML
style
CSS
javascript
JavaScript
테스트 페이지
안녕하세요!
HTML, CSS, JavaScript를 자유롭게 테스트해보세요.
클릭해보세요
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; min-height: 100vh; } h1 { color: #fff; text-align: center; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); } p { text-align: center; font-size: 18px; margin-bottom: 30px; } button { display: block; margin: 20px auto; padding: 12px 24px; background: #ff6b6b; color: white; border: none; border-radius: 25px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4); } button:hover { background: #ff5252; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6); }
function showAlert() { alert('JavaScript가 정상적으로 작동합니다! 🎉'); } // 페이지 로드 시 실행되는 코드 document.addEventListener('DOMContentLoaded', function() { console.log('페이지가 로드되었습니다!'); // 버튼에 애니메이션 효과 추가 const button = document.querySelector('button'); if (button) { button.addEventListener('mouseenter', function() { this.style.transform = 'scale(1.1)'; }); button.addEventListener('mouseleave', function() { this.style.transform = 'scale(1)'; }); } });
preview
실행 결과