再完善一下,布局仿苹果官网,颜色也是
- User
再完善一下,布局仿苹果官网,颜色也是
Assistant
好的!我来创建一个更加贴近苹果官网的设计,包括苹果的经典配色方案、布局和视觉效果:
<!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> /* Reset and Base Styles */ *, *::before, *::after { box-sizing: border-box; } body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif; background: #000; color: #f5f5f7; line-height: 1.47059; font-weight: 400; letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* Header */ header { position: fixed; top: 0; width: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); z-index: 1000; transition: all 0.3s ease; } nav { max-width: 980px; margin: 0 auto; padding: 0 22px; display: flex; justify-content: space-between; align-items: center; height: 44px; } .logo { font-size: 21px; font-weight: 600; color: #f5f5f7; letter-spacing: -0.022em; } nav ul { list-style: none; display: flex; gap: 40px; margin: 0; padding: 0; } nav ul li a { color: #f5f5f7; text-decoration: none; font-size: 12px; font-weight: 400; letter-spacing: -0.01em; opacity: 0.8; transition: opacity 0.3s ease; padding: 8px 0; position: relative; } nav ul li a:hover { opacity: 1; } nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: #0071e3; transition: width 0.3s ease; } nav ul li a:hover::after { width: 100%; } /* Main Content */ main { padding-top: 44px; } /* Hero Section */ .hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); text-align: center; padding: 120px 22px 80px; position: relative; overflow: hidden; } .hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.3); } .hero-content { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; } .hero h1 { font-size: 56px; font-weight: 600; line-height: 1.07143; letter-spacing: -0.005em; margin: 0 0 6px; color: #fff; } .hero p { font-size: 28px; font-weight: 400; line-height: 1.14286; letter-spacing: 0.007em; color: rgba(255, 255, 255, 0.9); margin: 0; } /* Section Spacing */ .section { padding: 80px 22px; max-width: 980px; margin: 0 auto; } .section-title { font-size: 48px; font-weight: 600; line-height: 1.08349; letter-spacing: -0.003em; color: #f5f5f7; text-align: center; margin: 0 0 60px; } /* Blog Posts Grid */ .blog-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; } /* Blog Post Card */ .blog-post { background: #1d1d1f; border-radius: 18px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.1); } .blog-post:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); } .post-image { width: 100%; height: 200px; background: linear-gradient(45deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: white; position: relative; overflow: hidden; } .post-image::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.2); } .post-content { padding: 30px; } .post-title { font-size: 24px; font-weight: 600; line-height: 1.16667; letter-spacing: 0.009em; color: #f5f5f7; margin: 0 0 8px; } .post-meta { font-size: 14px; color: #86868b; margin: 0 0 16px; font-weight: 400; } .post-excerpt { font-size: 17px; line-height: 1.47059; color: #a1a1a6; margin: 0 0 24px; } .read-more { color: #0071e3; text-decoration: none; font-size: 17px; font-weight: 400; transition: color 0.3s ease; } .read-more:hover { color: #0077ed; text-decoration: underline; } .read-more::after { content: ' →'; transition: transform 0.3s ease; display: inline-block; } .read-more:hover::after { transform: translateX(4px); } /* CTA Section */ .cta-section { background: #1d1d1f; text-align: center; padding: 80px 22px; margin: 80px 0; border-radius: 18px; max-width: 980px; margin-left: auto; margin-right: auto; } .cta-title { font-size: 40px; font-weight: 600; color: #f5f5f7; margin: 0 0 16px; } .cta-text { font-size: 21px; color: #a1a1a6; margin: 0 0 32px; } .cta-button { display: inline-block; background: #0071e3; color: #fff; padding: 12px 24px; border-radius: 980px; text-decoration: none; font-size: 17px; font-weight: 400; transition: background-color 0.3s ease, transform 0.3s ease; } .cta-button:hover { background: #0077ed; transform: scale(1.02); } /* Footer */ footer { background: #1d1d1f; padding: 40px 22px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.1); } .footer-content { max-width: 980px; margin: 0 auto; } .footer-text { color: #86868b; font-size: 12px; margin: 0 0 20px; } .social-links { display: flex; justify-content: center; gap: 20px; } .social-link { width: 44px; height: 44px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #f5f5f7; text-decoration: none; font-size: 18px; transition: background-color 0.3s ease, transform 0.3s ease; } .social-link:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); } /* Responsive Design */ @media (max-width: 768px) { nav ul { gap: 20px; } nav ul li a { font-size: 11px; } .hero { padding: 80px 22px 60px; } .hero h1 { font-size: 36px; } .hero p { font-size: 21px; } .section-title { font-size: 32px; } .blog-posts { grid-template-columns: 1fr; gap: 30px; } .cta-title { font-size: 28px; } .cta-text { font-size: 17px; } } @media (max-width: 480px) { nav { padding: 0 16px; } .hero, .section, .cta-section { padding-left: 16px; padding-right: 16px; } .hero h1 { font-size: 28px; } .hero p { font-size: 17px; } } </style> </head> <body> <!-- Header --> <header id="header"> <nav> <div class="logo">我的博客</div> <ul> <li><a href="#home">首页</a></li> <li><a href="#blog">博客</a></li> <li><a href="#about">关于</a></li> <li><a href="#contact">联系</a></li> </ul> </nav> </header> <!-- Main Content --> <main> <!-- Hero Section --> <section class="hero" id="home"> <div class="hero-content"> <h1>思考·创造·分享</h1> <p>探索技术的边界,记录成长的足迹</p> </div> </section> <!-- Blog Posts Section --> <section class="section" id="blog"> <h2 class="section-title">最新文章</h2> <div class="blog-posts"> <article class="blog-post"> <div class="post-image"> <span>AI 未来</span> </div> <div class="post-content"> <h3 class="post-title">探索人工智能的未来</h3> <div class="post-meta">2025年5月25日 · 技术洞察</div> <p class="post-excerpt">人工智能正在重塑我们的世界。从机器学习到深度学习,从自然语言处理到计算机视觉,AI技术的每一次突破都在推动着人类文明的进步。</p> <a href="#" class="read-more">阅读全文</a> </div> </article> <article class="blog-post"> <div class="post-image"> <span>Web 开发</span> </div> <div class="post-content"> <h3 class="post-title">现代Web开发最佳实践</h3> <div class="post-meta">2025年5月20日 · 开发经验</div> <p class="post-excerpt">在快速发展的Web技术生态中,掌握最新的开发模式和工具链至关重要。本文将分享一些经过实践验证的开发技巧和架构思路。</p> <a href="#" class="read-more">阅读全文</a> </div> </article> <article class="blog-post"> <div class="post-image"> <span>生活思考</span> </div> <div class="post-content"> <h3 class="post-title">数字时代的工作与生活</h3> <div class="post-meta">2025年5月15日 · 生活感悟</div> <p class="post-excerpt">远程工作、数字化协作、AI助手...技术正在改变我们的工作方式。如何在这个变化的时代中找到平衡,保持创造力和人文关怀?</p> <a href="#" class="read-more">阅读全文</a> </div> </article> </div> </section> <!-- CTA Section --> <section class="cta-section"> <h2 class="cta-title">订阅我的博客</h2> <p class="cta-text">获取最新的技术洞察和思考分享</p> <a href="#" class="cta-button">立即订阅</a> </section> </main> <!-- Footer --> <footer> <div class="footer-content"> <p class="footer-text">© 2025 我的个人博客. 保留所有权利.</p> <div