1. html 结构

<section id="contact">
<div class="contact-form bg-primary p-2">
<h2 class="m-heading">Contact Us</h2>
<p>如有疑问请填写以下信息联系我们!</p>
<form>
<div class="form-group">
<label for="name">姓名</label>
<input type="text" name="name" id="name" placeholder="情输入姓名">
</div>
<div class="form-group">
<label for="name">邮箱</label>
<input type="email" name="email" id="email" placeholder="情输入邮箱">
</div>
<div class="form-group">
<label for="message">反馈信息</label>
<textarea name="message" id="message" placeholder="情输入内容"></textarea>
</div>
</form>
<input type="submit" class="btn btn-dark">
</div>
<div class="contact-img"></div>
</section>
<!-- foter -->
<foter id="main-footer" class="bg-dark text-center py-1">
<div class="container">
<p>Copyright &copy; 2021, 米修在线, All Right Reserved</p>
</div>
</foter>

2. css

/* rest */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4;
}
a {
text-decoration: none;
}
p {
margin: 0.75rem 0;
} /* utility classes */
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 2rem;
overflow: hidden;
}
.text-center {
text-align: center;
}
.bg-light {
background: #f4f4f4;
color: #333;
}
.bg-dark {
background: #333;
color: #fff;
}
.bg-primary {
background: #93cb52;
color: #fff;
}
.p-1 {
padding: 1.5rem;
}
.p-2 {
padding: 2rem;
}
.p-3 {
padding: 3rem;
}
.text-primary {
color: #32cb52;
}
.l-heading {
font-size: 4rem;
margin-bottom: 0.75rem;
line-height: 1.1;
}
.m-heading {
font-size: 2rem;
margin-bottom: 0.75rem;
line-height: 1.1;
}
.lead {
font-size: 1.3rem;
margin-bottom: 2rem;
}
.py-1 {
padding: 1.5rem 0;
}
.py-2 {
padding: 2rem 0;
}
.py-3 {
padding: 3rem 0;
}
.btn {
display: inline-block;
color: #fff;
background-color: #93cb52;
padding: 0.5rem 2rem;
border: none;
border-radius: 5px;
}
.btn:hover {
background-color: #7ab436;
}
.btn-dark {
background: #333;
color: #fff;
}
.list {
margin: 0.5rem 0;
list-style: none;
}
.list li {
padding: 0.5rem 0;
border-bottom: #444 dotted 1px;
}
/* navbar */
#navbar {
display: flex;
/* 两端对齐 */
justify-content: space-between;
background: #333;
color: #fff;
position: sticky;
top: 0;
z-index: 1;
padding: 1rem;
} #navbar ul {
display: flex;
list-style: none;
/* 以中心点进行对齐 */
align-items: center;
}
#navbar ul li a {
color: white;
padding: 0.75rem;
margin: 0 0.25rem;
}
#navbar ul li a:hover {
background: #93cb52;
border-radius: 5px;
} /* home */
#home {
background: url('../img/1.jpg') no-repeat center center/cover;
height: 100vh;
color: #ffffff;
position: relative;
}
#home .home-content {
display: flex;
/* 垂直方向排列 */
flex-direction: column;
/* 垂直居中 */
justify-content: center;
/* 水平居中 */
align-items: center;
text-align: center;
height: 100%;
padding: 0 2rem;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(0,0,0,0.4);
} /* section: what we do */
#what .items {
display: flex;
padding: 1rem;
}
#what .items .item {
flex: 1;
text-align: center;
}
#what .items .item i {
background: #93cb52;
padding: 1rem;
border-radius: 50%;
margin-bottom: 1rem;
} /* section : Who We Are */
#who {
display: flex;
}
#who div {
flex: 1;
flex-basis: 50%;
}
#who .who-img {
background: url('../img/2.jpg') no-repeat center center/cover;
}
/* section: clients */
#clients .items {
overflow: hidden;
display: flex;
justify-content: space-around;
}
#clients .items img {
display: block;
margin: 0 auto;
border-radius: 50%;
width: 100%;
height: 100%;
}
#clients .items div{
justify-content: space-around;
width: 100px;
height: 100px;
border-radius: 50%;
} /* section: contact */
#contact {
display: flex;
}
#contact .contact-form,
#contact .contact-img {
flex: 1;
}
#contact .contact-img {
background: url('../img/2.jpg') no-repeat center center/cover;
}
#contact .contact-form .from-group {
margin: 0.75rem;
}
#contact .contact-form label {
display: block;
}
#contact .contact-form input,
#contact .contact-form textarea {
width: 100%;
padding: 0.5rem;
}

最新文章

  1. Scalaz(58)- scalaz-stream: fs2-并行运算示范,fs2 parallel processing
  2. 深入了解javascript事件流
  3. JNI技术基础(2)——从零开始编写JNI代码
  4. 错误3 error C3859: 超过了 PCH 的虚拟内存范围;请使用“-Zm120”
  5. SAP自定义打印机纸张
  6. [Android Exception 1A] -com.android.volley.NoConnectionError: java.io.InterruptedIOException
  7. 前端之JavaScript第二天学习(5)-JavaScript-语句
  8. POJ 水题若干
  9. Can&#39;t initialize OCI. Error -1
  10. 浅谈 non-blocking I/O Multiplexing + poll/epoll 的正确使用
  11. Spring框架学习之依赖注入
  12. ajax(2)
  13. javascript入门篇(一)
  14. jvm本地实战
  15. 单点登录系统---SSO
  16. 在 Ubuntu 上使用微信客户端
  17. .NetCore下B/S结构 初探基于遗传学算法的中学自动排课走班(二)
  18. 使用IntelliJ IDEA 15和Maven创建Java Web项目
  19. SharePoint 服务应用程序管理-PowerShell
  20. mongodb-mongotemplate进行地理坐标操作

热门文章

  1. python 实现批量md转word
  2. 搭建域环境,安装Exchange Server 2013,复现CVE-2019-1040
  3. tensorflow2.4与目标检测API在3060显卡上的配置安装
  4. C#: .net序列化及反序列化 [XmlElement(“节点名称”)] [XmlAttribute(“节点属性”)] (下篇)
  5. 文档类型声明&lt;!DOCTYPE html&gt;
  6. nginx反向代理失败,又是 fastdfs 的锅
  7. 介绍Collection框架的结构?
  8. java-规约-集合
  9. consumer提交offset原理
  10. WSGI是个啥?大白话告诉你wsgi做了什么!