首页 > web前端 > js教程 > 日间网站

日间网站

WBOY
发布: 2024-08-08 09:53:32
原创
894 人浏览过

Day Websites for Days

经过 5 天的渐进式 HTML 学习,我很高兴我们处于这一切的最后阶段,即本课程基于项目的部分,我只是在其中构建网站并挑战自己...

简单的用户登录和注册页面

链接到项目用户页面

注册页面的 HTML-

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Signup Page</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header>
      <h2>User Login Page</h2>
    </header>
    <section>
      <main style="text-align: center;">
      <br/>
      <br/>
      <b> <h3> Enter Login Details </h3> <br/>
      </main>
      <article  class="container">
      <br/>
      <form>
      <b> <label for="email"> Email </label> <b> <br/>
      <input type="email" id="email" name="email"> <br/>
      <br/>
      <b> <label for="password"> Password </label> </b> <br/>
      <input type="password" id="password" name="password"> <br/>
      <br/>
      <button>Submit</button> <br/>
      </form> 
      <br/>
      <p>
      Don't Have An Account? <a href="signup.html">Sign Up</a>
      </p>
      </article>
    </section>
    <section>

    </section>
  </body>
</html>

登录后复制

注册页面的 HTML-

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Signup Page</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header>
      <h2>User Signup Page</h2>
    </header>
    <section>
      <main style="text-align: center;">
      <br/>
      <br/>
      <b> <h3> Enter Signup Details </h3> <br/>
      </main>
      <article  class="container">
      <br/>
      <form>
      <b> <label for="fname"> First Name </label><br/> 
      <input type="text" id="fname" name="fname"><br/>  
      <br/> 
      <b> <label for="lname"> Last Name </label> <br/>   
      <input type="text" id="lname" name="lname"> <br/>
      <br/> 
      <b> <label for="email"> Email </label> <b> <br/>
      <input type="email" id="email" name="email"> <br/>
      <br/>
      <b> <label for="password"> Password </label> </b> <br/>
      <input type="password" id="password" name="password"> <br/>
      <br/>
      <button>Submit</button> <br/>
      </form> 
      <br/>
      <p>
      Already Have An Account? <a href="index.html">Sign In</a>
      </p>
      </article>
    </section>
    <section>

    </section>
  </body>
</html>

登录后复制

CSS 样式-

/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* Body styles */
body {
  background-color: antiquewhite;
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  flex-direction: column;
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 20px; /* Add some space between the header and the content */
}

/* Article styles */
article {
  border: 1px solid black;
  padding: 20px; /* Add some padding inside the border */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: Tahoma, sans-serif;
  background-color: antiquewhite; /* Add background color for better visibility */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Optional: Add some shadow for better look */
}

/* h3 styles */
h3 {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
}

button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  color: black;
  border: none;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background-color: #ccc;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
  background-color: black;
  transform: translateY(-2px);
  color: white;
}

登录后复制

简单的交互式用户登录和注册网站...

以上是日间网站的详细内容。更多信息请关注PHP中文网其他相关文章!

来源:dev.to
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板