其他分享
首页 > 其他分享> > 联系我们的静态页面

联系我们的静态页面

作者:互联网

1. html 部分

<!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">
  <meta name="descripttion" content="来到米修在线">
  <title>铄洋在线 | 联系我们</title>
  <link rel="stylesheet" href="css/style.css">
</head>
<body>
  <header>
    <nav id="navbar">
      <h1><a href="1.html">铄洋在线</a></h1>
      <ul>
        <li><a href="1.html">首页</a></li>
        <li><a href="2.html">关于我们</a></li>
        <li><a class="curread" href="3.html">联系我们</a></li>
      </ul>
    </nav>
  </header>
  <section id="contact-form" class="py">
    <div class="container">
      <h1 class="l-heading"><span class="text-pranime">联系</span>我们</h1>
      <p>如有疑问请填写以下信息联系我们!</p>
      <form action="process.php">
        <div class="form-group">
          <label for="name">姓名</label>
          <input type="text" name="name" id="name">
        </div>
        <div class="form-group">
          <label for="emali">邮箱</label>
          <input type="text" name="emali" id="emali">
        </div>
        <div class="form-group">
          <label for="message">反馈内容</label>
          <textarea type="text" name="message" id="message"></textarea>
        </div>
        <button type="submit" class="btn">提交</button>
      </form>
    </div>
  </section>
  <section id="contact-form" class="bg-dark">
    <div class="container">
      <div class="box">
        <i class="fa fa-home fa-3x"></i>
        <h3>联系地址</h3>
        <p>Lorem ipsum dolor sit amet</p>
      </div>
      <div class="box">
        <i class="fa fa-phone fa-3x"></i>
        <h3>联系电话</h3>
        <p>028-1234567890</p>
      </div>
      <div class="box">
        <i class="fa fa-envelope fa-3x" aria-hidden="true"></i>
        <h3>邮箱地址</h3>
        <p>铄洋在线@163.com</p>
      </div>
    </div>
  </section>
  <footer id="main-footer">
    <p>米修在线 &copy; 2021, All Rights Reaerved</p>
  </footer>
</body>
</html>

 

2. css 样式的内容

/* reset */
/* 重置样式 */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
/* main styling */
html, body{
  font-family: 'Segoe Ul', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7em;
}
a {
  color: #333;
  text-decoration: none;
}
h1, h2, h3 {
  padding-bottom: 20px;
}
p {
  margin: 10px 0;
}

/* utitlity classes */
/* 重点 通用样式 */
.container {
  margin: 0 auto;
  max-width: 1100px;
  overflow: hidden;
  padding: 0 20px;
}
.text-pranime {
  color: #f7c08a;
}
.bg-dark {
  background-color: #444;
  color: #ffffff;
}
.clr {
  clear: both;
}
.py {
  padding: 10px 0;
}
.l-heading {
  font-size: 40px;
  padding-top: 20px;
}

/* navber */
#navbar {
  background-color: #333;
  color: #ffffff;
  overflow: auto;
}
#navbar a{
  color: #ffffff;
}
#navbar h1 {
  float: left;
  padding-top: 20px;
}
#navbar ul {
  float: right;
  list-style: none;
}
#navbar ul li{
  float: left;
}
#navbar ul li a{
  display: block;
  padding: 20px;
  text-align: center;
}

#navbar ul a:hover,
#navbar ul a.curread{
  background-color: #444;
  color: bisque;
}

/* showcase   */
/* center/cover */
#showcase {
  background: url('../img/pexels-abdullah-ghatasheh-1631677.jpg') no-repeat center center/cover;
  height: 600px;
}
#showcase .showcase-content {
  color: #ffffff;
  text-align: center;
  padding-top: 170px;
}
#showcase .showcase-content h1 {
  font-size: 60px;
  line-height: 1.2em;
}

#showcase .showcase-content p {
  font-size: 20px;
  line-height: 1.7em;
  padding-bottom: 20px;
}
.btn {
  display: inline-block;
  font-size: 18px;
  color: #ffffff;
  background: #333;
  padding: 13px 20px;
  border: none;
}
.btn:hover {
  background-color: #f7c08a;
}
.btn-ligin {
  background: #f4f4f4;
  color: #333;
}

/* home-info */
#home-info {
  height: 400px;
}
#home-info .info-img {
  float: left;
  width: 50%;
  /* background: url图片路径 no-repeat不平铺  center居中  center/cover居中并且沾满整个盒子容器(屏幕)*/
  background: url('../img/pexels-photo-1590511.jpeg') no-repeat center center/cover;
  height: 100%;
}
#home-info .info-content {
  float: right;
  width: 50%;
  height: 100%;
  text-align: center;
  padding: 50px 30px;
  overflow: hidden;
}
#home-info .info-content p{
  padding-bottom: 30px;
}

/* features */
.box {
  float: left;
  width: 33.3%;
  padding: 50px;
  text-align: center;
}
.box i{
  margin-bottom: 10px;
}
.bg-light {
  background-color: #f4f4f4;
  color: #333;
}
.bg-primary {
  background-color: #f7c08a;
  color: #333;
}

/* about-info */
#about-info .info-left {
  float: left;
  width: 50%;
  height: 100%;
}
#about-info .info-right {
  float: right;
  width: 50%;
  height: 100%;
}
#about-info .info-right img {
  display: block;
  width: 80%;
  margin: 0 auto;
  border-radius: 50%;
}

/* testimonals */
#testimon {
  height: 600px;
  background: url('../img/pexels-photo-1527934.webp') no-repeat center center/cover;
  padding-top: 100px;
}
#testimon h2 {
  color: #ffffff;
  text-align: center;
  padding-bottom: 40px;
}
#testimon .testimonial {
  padding: 20px;
  margin-bottom: 40px;
  border-radius: 5px;
  opacity: 0.8;
}
#testimon .testimonial img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  float: left;
  margin-right: 20px;
}
/* contact-form */
#conavct-form .form-group {
  margin-bottom: 20px;
}
#contact-form label {
  display: block;
  margin-bottom: 5px;
}
#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px #ddd solid;
}
#contact-form textarea {
  height: 200px;
}
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: #f7c08a;
}

/* fppter */
#main-footer {
  text-align: center;
  background-color: #333;
  color: #ffffff;
  padding: 20px;
}

 

 

3. 重点

字体图标

<i class="fa fa-envelope fa-3x" aria-hidden="true"></i>

class="fa(必选属性)  fa-envelope(字体图标样式) fa-3x(字体图标大小)"

 

 

 

标签:info,联系,静态,center,height,padding,color,background,页面
来源: https://www.cnblogs.com/wqddmghsdfh/p/16053054.html