css+div布局实现自适应大气高科技蓝色企业官网布局代码
代码语言:html
所属分类:布局界面
代码描述:css+div布局实现自适应大气高科技蓝色企业官网布局代码
代码标签: css div 布局 自适应 大气 高科技 蓝色 企业 官网 布局 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>智能未来 - 专业AI工具服务提供商</title> <style> :root { --primary-color: #0066cc; --secondary-color: #003d7a; --accent-color: #00a8ff; --light-color: #f0f8ff; --dark-color: #001a33; --text-color: #333333; --text-light: #ffffff; --gradient-bg: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif; } body { background-color: #f5f9ff; color: var(--text-color); line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } /* 导航栏 */ header { background: var(--gradient-bg); color: var(--text-light); padding: 20px 0; position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } nav { display: flex; justify-content: space-between; align-items: center; } .logo { font-size: 28px; font-weight: bold; display: flex; align-items: center; } .logo span { color: var(--accent-color); } .logo-icon { margin-right: 10px; font-size: 32px; } .nav-links { display: flex; list-style: none; } .nav-links li { margin-left: 30px; } .nav-links a { color: var(--text-light); text-decoration: none; font-weight: 500; transition: color 0.3s; position: relative; } .nav-links a:hover { color: var(--accent-color); } .nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--accent-color); transition: width 0.3s; } .nav-links a:hover::after { width: 100%; } .btn { background-color: var(--accent-color); color: white; padding: 10px 25px; border: none; border-radius: 30px; cursor: pointer; font-weight: 600; transition: all 0.3s; text-decoration: none; display: inline-block; } .btn:hover { background-color: #0099e6; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3); } /* 英雄区 */ .hero { background: var(--gradient-bg); color: var(--text-light); padding: 180px 0 100px; position: relative; overflow: hidden; } .hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>'); background-size: cover; background-position: center; opacity: 0.1; } .hero-content { display: flex; align-items: center; justify-content: space-between; } .hero-text { flex: 1; max-width: 600px; } .hero h1 { font-size: 48px; margin-bottom: 20px; line-height: 1.2; } .hero p { font-size: 18px; margin-bottom: 30px; opacity: 0.9; } .hero-image { flex: 1; text-align: center; } .hero-image img { max-width: 100%; animation: float 3s ease-in-out infinite; } @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } } .hero-buttons { display: flex; gap: 15px; } .btn-secondary { background-color: transparent; border: 2px solid var(--text-light); } .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1); } /* 特性部分 */ .features { padding: 100px 0; background-color: white; } .section-header { text-align: center; margin-bottom: 60px; } .section-header h2 { font-size: 36px; color: var(--primary-color); margin-bottom: 15px; } .section-header p { font-size: 18px; color: #666; max-width: 700px; margin: 0 auto; } .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; } .feature-card { background: white; border-radius: 10px; padding: 30px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); transition: transform 0.3s, box-shadow 0.3s; text-align: center; } .feature-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .feature-icon { width: 70px; height: 70px; background: var(--light-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--primary-color); font-size: 30px; } .feature-card h3 { font-size: 22px; margin-bottom: 15px; color: var(--primary-color); } .feature-card p { color: #666; } /* 产品部分 */ .products { padding: 100px 0; background-color: var(--light-color); } .products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; } .product-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); transition: transform 0.3s, box-shadow 0.3s; } .product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .product-image { height: 200px; background: var(--gradient-bg); display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; } .product-content { padding: 25px; } .product-card h3 { font-size: 22px; margin-bottom: 15px; color: var(--primary-color); } .product-card p { color: #666; margin-bottom: 20px; } /* 客户评价 */ .testimonials { padding: 100px 0; background-color: white; } .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; } .testimonial-card { background: var(--light-color); border-radius: 10px; padding: 30px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); position: relative; } .testimonial-card::before { content: '"'; position: absolute; top: 20px; left: 20px; font-size: 60px; color: var(--primary-color); opacity: 0.2; font-family: Georgia, serif; } .testimonial-content { margin-bottom: 20px; font-style: italic; color: #555; } .testimonial-author { display: flex; align-items: center; } .author-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--gradient-bg); margin-right: 15px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; } .author-info h4 { font-size: 18px; margin-bottom: 5px; color: var(--primary-color); } .author-info p { color: #666; font-size: 14px; } /* 联系我们 */ .contact { padding: 100px 0; background-color: var(--light-color); } .contact-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 50px; } .contact-info { color: var(--text-color); } .contact-info h3 { font-size: 24px; margin-bottom: 20px; color: var(--primary-color); } .contact-info p { margin-bottom: 30px; } .contact-item { display: flex; align-items: center; margin-bottom: 20px; } .contact-icon { width: 40px; height: 40px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; color: white; } .contact-form { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); } .contact-form h3 { font-size: 24px; margin-bottom: 20px; color: var(--primary-color); } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 5px; color: #555; } .form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px; transition: border-color 0.3s; } .form-group input:focus, .form-group textarea:focus { border-color: var(--primary-color); outline: none; } .form-group textarea { height: 120px; resize: vertical; } /* 页脚 *.........完整代码请登录后点击上方下载按钮下载查看
网友评论0