div+css布局实现咖啡官网代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现咖啡官网代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Oswald:wght@400;500;600&family=Roboto:wght@300;400;500&display=swap');
:root {
--primary: #2A2522;
--secondary: #936639;
--light: #F7F3EE;
--dark: #1A1412;
--accent: #D4A24E;
--accent-dark: #B5752E;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
h1, h2, h3, .section-title {
font-family: 'Playfair Display', serif;
font-weight: 700;
}
.logo, .btn, nav ul li a {
font-family: 'Oswald', sans-serif;
text-transform: uppercase;
}
body {
background-color: var(--light);
color: var(--dark);
line-height: 1.6;
letter-spacing: 0.5px;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background-color: var(--dark);
padding: 20px 0;
position: sticky;
top: 0;
z-index: 100;
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.8rem;
font-weight: 700;
color: var(--light);
text-decoration: none;
display: flex;
align-items: center;
letter-spacing: 2px;
text-transform: uppercase;
}
.logo span {
color: var(--accent);
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-left: 30px;
}
nav ul li a {
color: var(--light);
text-decoration: none;
font-weight: 500;
transition: color 0.3s;
}
nav ul li a:hover {
color: var(--accent);
}
.cta-buttons {
display: flex;
gap: 15px;
align-items: center;
}
.btn {
padding: 10px 20px;
border-radius: 0;
font-weight: 600;
cursor: pointer;
text-decoration: none;
text-align: center;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 0.85rem;
display: inline-flex;
align-items: center;
justify-content: center;
heigh.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0