css+div布局实现ai应用类科技公司官网代码
代码语言:html
所属分类:布局界面
代码描述:css+div布局实现ai应用类科技公司官网代码
代码标签: css div 布局 ai 应用 科技 公司 官网 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* 基础样式 */
:root {
--primary-color: #6366f1;
--secondary-color: #818cf8;
--accent-color: #4f46e5;
--text-color: #1e293b;
--light-text: #64748b;
--lighter-text: #94a3b8;
--border-color: #e2e8f0;
--bg-color: #fff;
--light-bg: #f8fafc;
--hover-bg: #f1f5f9;
--card-bg: #ffffff;
--shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--border-radius: 8px;
--card-radius: 12px;
--transition: all 0.3s ease;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
color: var(--text-color);
line-height: 1.6;
background-color: var(--light-bg);
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
a {
text-decoration: none;
color: inherit;
transition: var(--transition);
}
ul {
list-style: none;
}
img {
max-width: 100%;
border-radius: var(--border-radius);
}
.btn {
display: inline-block;
padding: 10px 24px;
border-radius: 30px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
text-align: center;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
border: none;
box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
background-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(99, 102, 241, 0.3);
}
.btn-outline {
background-color: transparent;
color: var(--primary-color);
border: 1px solid var(--primary-color);
}
.btn-outline:hover {
background-color: var(--hover-bg);
transform: translateY(-2px);
}
.section-title {
font-size: 32px;
font-weight: 700;
margin-bottom: 50px;
text-align: center;
position: relative;
padding-bottom: 15px;
}
.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
border-radius: 3px;
}
/* 导航栏样式 */
.header {
background-color: var(--bg-color);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
position: sticky;
top: 0;
z-index: 100;
}
.header-container {
display: flex;
justify-content: space-between;
align-items: center;
height: 70px;
}
.logo img {
height: 36px;
}
.main-nav ul {
display: flex;
}
.main-nav li {
margin: 0 18px;
}
.main-nav a {
color: var(--text-color);
font-size: 16px;
font-weight: 500;
position: relative;
}
.main-nav a::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 0;
height: 2px;
background-color: var(--primary-color);
transition: width 0.3s ease;
}
.main-nav a:hover {
color: var(--primary-color);
}
.main-nav a:hover::after {
width: 100%;
}
.user-actions {
display: flex;
align-items: center;
}
.user-actions a {
margin-left: 20px;
font-size: 16px;
font-weight: 500;
}
.search-btn {
color: var(--light-text);
}
.login-btn {
color: var(--primary-color);
}
.register-btn {
background-color: var(--primary-color);
color: white;
padding: 8px 20px;
border-radius: 30px;
box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}
.register-btn:hover {
background-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(99, 102, 241, 0.3);
}
/* 产品介绍区样式 */
.hero-section {
padding: 80px 0;
background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
position: relative;
overflow: hidden;
}
.hero-section::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 50%;
height: 100%;
background: url('https://source.unsplash.com/random/1000x800/?pattern,tech') center/cover;
opacity: 0.05;
z-index: 0;
}
.hero-section .container {
display: flex;
align-items: center;
position: relative;
z-index: 1;
}
.hero-content {
flex: 1;
padding-right: 60px;
}
.hero-image {
flex: 1;
position: relative;
}
.hero-image img {
border-radius: 12px;
box-shadow: var(--shadow);
transform: perspective(1000px) rotateY(-5deg);
transition: transform 0.5s ease;
}
.hero-image:hover img {
transform: perspective(1000px) rotateY(0deg);
}
.hero-content h1 {
font-size: 48px;
font-weight: 800;
margin-bottom: 16px;
background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.subtitle {
color: var(--light-.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0