模仿的freecodecamp的一个作品
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人作品集展示页</title>
<style>
*{
padding: 0;
margin: 0;
}
html{
box-sizing: border-box;
font-size: 62.5%;
scroll-behavior: smooth;
}
@media(max-width:65rem){
html{
font-size: 60%;
}
}
body{
font-family: 'Poppins', sans-serif;
font-weight: 400;
font-size: 1.8rem;
line-height: 1.4;
color: #f0f0f0;
overflow-x: hidden;
}
h1,h2{
font-family: 'Raleway', sans-serif;
font-weight: 700;
text-align: center;
}
h1{
font-size: 6rem;
}
h2{
font-size: 3.8rem;
}
a{
text-decoration: none;
color: #f0f0f0;
}
img{
display: block;
width: 100%;
}
nav{
background:#be3144;
position: fixed;
top: 0;
left: 0;
display: flex;
justify-content:space-between;
align-items: center;
width: 100%;
z-index: 10;
}
ul{
list-style: none;
}
#navbar>img{
display: flex;
max-width: 300px;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
margin-left: 20px;
}
.nav-list{
display: flex;
margin-right: 2rem;
margin-top: 0;
margin-bottom: 0;
}
.nav-list a{
display: block;
font-size: 2.2rem;
padding: 2rem;
}
.nav-list a:hover{
background-color: #45567d;
}
.welcome-section{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
line-height: 2;
width: 100%;
height: 100vh;
background-color: #000;
background-image: linear-gradient(62deg,#3a3d40 0%,#181719 100%);
}
.welcome-section h1{
font-size: 6rem;
font-weight: bolder;
}
.welcome-section p{
font-family:'Poppins', sans-serif;
font-size: 3rem;
font-style: italic;
color: #be3144;
font-weight: 200;
}
.projects-section{
padding: 10rem 2rem;
text-align: center;
background-color: #45567d;
}
.projects-title{
max-width: 640px;
margin: 0 auto 6rem auto;
border-bottom: solid #f0f0f0 0.2rem;
}
.projects-grid{
display: grid;
grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
grid-gap:4rem;
max-width: 1280px;
width: 100%;
margin: 0 auto;
margin-bottom: 6rem;
}
.project-image{
height: calc(100% - 6.8rem);
width: 100%;
object-fit: cover;
}
.project-a{
background-color: #303841;
border-radius: 2px;
box-shadow: 1px 1px 2px rgb(0 0 0/ 50%);
}
.project-p{
padding: 2rem 0.5rem;
font-size: 2rem;
}
.code{
color: #303841;
transition: color 0.3s ease-in-out;
}
.project-a:hover .code{
color:#ff7f50;
}
.btn{
width: 15rem;
height: 4.2rem;
background-color: #303841;
font-size: 2rem;
color: #f0f0f0;
padding: 0.5rem;
border: none;
border-radius: 2px;
transform: translateX(0);
}
.btn:hover{
background-color: #be3144;
transform: translateX(2);
cursor: pointer;
transition: background-color transform 0.3s ease-out;
}
.contact-section{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background-color: #303841;
padding: 0 2rem;
width: 100%;
height: 80vh;
}
.contact-section h1{
font-size: 6rem;
margin-bottom: 2rem;
}
.contact-section p{
font-style: italic;
font-weight: 200;
}
.contact-links{
display: flex;
justify-content: center;
flex-wrap: wrap;
width: 100%;
max-width: 980px;
margin-top: 4rem;
}
.contact-links a{
font-size: 2.4rem;
padding:1rem 2rem;
text-shadow: 2px 2px 1px #1f1f1f;
transition: transform 0.3s ease-out;
}
.contact-links a:hover{
transform: translateY(8px);
}
.footer{
display: flex;
justify-content:space-evenly;
background-color:#303841;
font-weight: 300;
border-top: #be3144 4px solid;
padding: 2rem;
}
.footer > p{
margin: 2rem;
}
</style>
</head>
<body>
<nav id="navbar">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" alt="">
<ul class="nav-list">
<li><a href="#welcome-section">About</li></a>
<li><a href="#projects">Product</li></a>
<li><a href="#contact">Contact</li></a>
</ul>
</nav>
<section id="welcome-section" class="welcome-section">
<h1>We Are Family</h1>
<p>a web-learning student</p>
</section>
<section id="projects" class="projects-section">
<h2 class="projects-title">These are some of my projects</h2>
<div class="projects-grid">
<a href="file:///C:/Users/86188/Desktop/web%E5%BC%80%E5%8F%91/%E7%BD%91%E9%A1%B5/Lover.html" class="project-a" target="_blank">
<img src="file:///C:/Users/86188/Pictures/QQ%E5%9B%BE%E7%89%8720210514171335.png" alt="" class="project-image">
<p class="project-p">
<span class="code"><</span>
Tribute Page
<span class="code">/></span>
</p>
</a>
<a href="file:///C:/Users/86188/Desktop/web%E5%BC%80%E5%8F%91/%E7%BD%91%E9%A1%B5/%E8%87%AA%E6%88%91%E4%BB%8B%E7%BB%8D.html" class="project-a" target="_blank">
<img src="C:/Users/86188/Desktop/web开发/网页/表单.png" alt="" class="project-image">
<p class="project-p">
<span class="code"><</span>
Submit Form
<span class="code">/></span>
</p>
</a>
<a href="file:///C:/Users/86188/Desktop/web%E5%BC%80%E5%8F%91/%E7%BD%91%E9%A1%B5/%E4%BA%A7%E5%93%81%E7%99%BB%E9%99%86%E9%A1%B5.html" target="_blank" class="project-a">
<img src="C:/Users/86188/Desktop/web开发/网页/产品登陆页.png" alt="" class="project-image">
<p class="project-p">
<span class="code"><</span>
Product Landing
<span class="code">/></span>
</p>
</a>
<a href="file:///C:/Users/86188/Desktop/web%E5%BC%80%E5%8F%91/%E7%BD%91%E9%A1%B5/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3%E9%A1%B5%E9%9D%A2.html" target="_blank" class="project-a">
<img src="C:/Users/86188/Desktop/web开发/网页/技术文档页面.png" alt="" class="project-image">
<p class="project-p">
<span class="code"><</span>
Technical Documentation Page
<span class="code">/></span>
</p>
</a>
<a href="https://codepen.io/freeCodeCamp/full/wgGVVX" class="project-a"target="_blank">
<img src="C:/Users/86188/Desktop/web开发/网页/计算器.png" alt="" class="project-image" >
<p class="project-p">
<span class="code"><</span>
JavaScript Calculator
<span class="code">/></span>
</p>
</a>
<a href="https://codepen.io/freeCodeCamp/full/KzXQgy" class="project-a"target="_blank">
<img src="C:/Users/86188/Desktop/web开发/网页/游戏.png" alt="" class="project-image" >
<p class="project-p">
<span class="code"><</span>
Play Game
<span class="code">/></span>
</p>
</a>
</div>
<a href="https://codepen.io/FreeCodeCamp/" target="_blank" class="a">
<button class="btn">Show All </button>
</a>
</section>
<section class="contact-section">
<div class="contact-head">
<h1>Let's Work Together</h1>
<p>Web-learning is very interesting</p>
</div>
<div class="contact-links">
<a href="https://www.qq.com" target="_blank">QQ</a>
<a href="https://www.wechat.com" target="_blank">WeChat</a>
<a href="http://www.qqemail.com" target="_blank">Email</a>
<a href="http://www.baidu.com" target="_blank">Call Me</a>
</div>
</section>
<footer class="footer">
<p>**This is just a fake portfolio. All the projects and contact details given are not real.</p>
<p>© Created by Qian </p>
</footer>
</body>
</html>