产品登录页的制作

目标: 构建一个功能类似于 https://product-landing-page.freecodecamp.rocks 的应用程序

<html>
<head>
  <meta charset="UTF-8">
  <title>My Product Landing Page</title>
  <link rel="stylesheet" href="styles.css">
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</head>
<body>
  <header id="header">
      <nav id="nav-bar">
      <a href="#header-img" class="nav-link">Marvel characters</a>
      <a href="#div" class="nav-link">Marvel animation</a>
      <a href="#form" class="nav-link">Matvel movie</a>
    </nav>
    <br/><br/>
    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606075010302&di=f0bae1b062c18ea8af0602129b89db8b&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181117%2F0fe7a984e2c14ef1bcf11969c264e108.jpeg" id="header-img">
  </div>
  <div id="div">
    <video id="video" controls="controls">
      <source src="https://b23.tv/vXRBbB">
    </video>
  </div>
  <form id="form" method="get" action="https://www.freecodecamp.com/email-submit">
    <input type="email" id="email" name="email" placeholder="this is email" required/>
    <input type="submit" id="submit">
  </form>
</body>
</html>

CSS

body{
  height: 100%;
  background-color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
}
a{
  color: #A5A5A5;
  background-color: #333333;
  margin: 1px;
  padding: 5px;
  border-radius: 5px;
  font-family: 黑体;
  text-decoration: none;
}
a:hover{
  color: #A51000;
}
#header-img{
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 100px;
}
@media screen and (max-width: 300px) {
    body {
        background-color:lightblue;
    }
}
#nav-bar{
  position: fixed;
  width: 100%;
  background-color: #333333;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
#form {
  position: relative;
  width: 100%;
  background-color: #333333;
  display: flex;
  flex-direction: row;
  justify-content: center;
}
#submit {
  color: #A5A5A5;
  background-color: black;
  border-radius: 5px;
}
#submit:hover {
  background-color: #666666
}
video {
  padding-top: 50px;
  padding-bottom: 50px;
  width: 600px;
  
}

评论

暂无评论