/* 主样式文件 - 演示CSS中的各种引用 */ /* 导入其他CSS文件 */ @import "./reset.css?v=1755687106028"; @import url("./components.css?v=1755687106028"); /* 字体引用 */ @font-face { font-family: 'CustomFont'; src: url('../fonts/font.woff2?v=1755687106028') format('woff2'), url('../fonts/font.woff?v=1755687106028') format('woff'); } /* 基础样式 */ body { font-family: 'CustomFont', Arial, sans-serif; line-height: 1.6; margin: 0; padding: 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; } .header { background: url('../images/header-bg.jpg?v=1755687106028') center/cover; color: white; text-align: center; padding: 2rem; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .header h1 { margin: 0; font-size: 2.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } .main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; } .demo-section { background: white; margin: 2rem 0; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } .demo-section h2 { color: #333; border-bottom: 2px solid #667eea; padding-bottom: 0.5rem; } .comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1rem; } .before, .after { padding: 1rem; border-radius: 5px; } .before { background: #ffe6e6; border-left: 4px solid #ff4444; } .after { background: #e6ffe6; border-left: 4px solid #44ff44; } .before h3, .after h3 { margin-top: 0; color: #333; } code { display: block; background: #f5f5f5; padding: 1rem; border-radius: 3px; font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.4; overflow-x: auto; } .footer { text-align: center; padding: 2rem; color: white; background: rgba(0,0,0,0.2); margin-top: 2rem; } /* 响应式设计 */ @media (max-width: 768px) { .comparison { grid-template-columns: 1fr; } .header h1 { font-size: 2rem; } .demo-section { padding: 1rem; } } /* 图标样式 */ .icon { width: 24px; height: 24px; background-image: url('../icons/check.svg?v=1755687106028'); background-size: contain; background-repeat: no-repeat; display: inline-block; margin-right: 0.5rem; } /* 按钮样式 */ .btn { background: linear-gradient(45deg, #667eea, #764ba2); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 5px; cursor: pointer; font-size: 1rem; transition: transform 0.2s; } .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }