太平洋保险官网项目实践(四)
文章目录
实现目标
今日实现目标:
1.寻找贴心服务
2.咨询保险专家
3.为什么选择太平洋
总共三部分,效果如下图所示:
第一部分第二部分第三部分
以下是本篇文章正文内容,下面案例可供参考
一、第一部分——寻找贴心服务
1.html
此部分主要分为标题与内容,内容分为左中右三部分
<div class="search">
<div>
<h2>寻找贴心服务</h2>
<div style="width: 1148px;height: 30px;">
<p class="text">热门服务</p>
<span>86%的用户用过如下服务</span>
<h4>寻找我需要的服务></h4>
</div>
<div class="search_main">
<div class="search_main_left">
<div><img src="../image/image1.png"></div>
<div>
<p>保单查询</p>
<p>多种方式轻松查找您的保单信息,全方位掌握您的保障情况</p>
</div>
</div>
<div class="search_main_left">
<div><img src="../image/image2.png"></div>
<div>
<p>理赔查询</p>
<p>一站式查询您名下所有保单的理赔信息,第一时间了解赔案处理进度</p>
</div>
</div>
<div class="search_main_left">
<div><img src="../image/gwHotSeviceKF.png"></div>
<div>
<p>洋洋客服</p>
<p>太平洋保险智能客服,7*24小时随时为您服务,满足您的服务需求</p>
</div>
</div>
</div>
</div>
</div>
2.css
/*总体*/
.search{
width: 100%;
height: 600px;
background-image: url('../image/Background1.png');
}
.search>div{
width: 1148px;
margin: 0 auto;
height: 520px;
}
/*大标题*/
.search>div h2{
text-align: center;
font-size: 44px;
letter-spacing: 2px;
color: white;
font-weight: 500;
padding-top: 60px;
}
/*小标题*/
.search .text{
font-size: 18px;
width: 80px;
float: left;
margin: 0;
color: white;
}
.search .text+span{
font-size: 16px;
color: white;
float: left;
margin-top: 4px;
}
.search h4{
font-size: 16px;
color: white;
float: right;
font-weight: inherit;
margin: 0;
}
/*内容部分*/
.search .search_main{
width: 1148px;
height: 400px;
}
/*内容的一部分*/
.search .search_main .search_main_left{
width: 33.33%;
height: 350px;
float: left;
margin-top: 56px;
}
.search .search_main .search_main_left div:nth-child(1){
width: 163px;
height: 163px;
margin: 0 auto;
}
.search .search_main .search_main_left div:nth-child(1) img{
width: 163px;
height: 163px;
border-radius: 50%;
box-shadow: 0px 5px 25px 0 rgba(0, 0, 0, 0.3);
transition: all .4s;/*为变形设置过渡样式*/
}
/*为图片设置变形,放大0.1倍*/
.search .search_main .search_main_left div:nth-child(1) img:hover{
transform: scale(1.1);
}
.search .search_main .search_main_left div:nth-child(2) p:nth-child(1){
font-size: 18px;
color: white;
text-align: center;
letter-spacing: 4px;
margin-top: 42px;
}
.search .search_main .search_main_left div:nth-child(2) p:nth-child(2){
width: 280px;
margin: 0 auto;
font-size: 16px;
opacity: 0.7;
margin-top: 20px;
line-height: 28px;
font-weight: 100;
color: white;
text-align: center;
}
二、第二部分——咨询保险专家
1.html
此部分主要是input标签与select标签的使用:
<div class="consulting">
<div>
<h2>咨询保险专家</h2>
<div>
<p class="text">怎么买保险</p>
<span>来问问专家的意见</span>
</div>
<p>金牌顾问,既是保险专家,也是您一生的朋友!</p>
<div class="consulting_main">
<div>
<h4>您的称呼:</h4>
<input type="text" placeholder="您的称呼">
</div>
<div>
<span>*</span>
<h4 style="width: 94px;">预留手机号:</h4>
<input type="text" placeholder="预留手机号">
</div>
<div>
<span>*</span>
<h4>身份证号:</h4>
<input type="text" placeholder="您的信息会被严格保密">
</div><br>
<div class="d_gender">
<h4>性别:</h4>
<select name="gender" id="gender" style="width: 40%;">
<option value="M">男</option>
<option value="F">女</option>
</select>
</div>
<div class="d_province">
<span>*</span>
<h4>居住地</h4>
<select name="procince" id="province" >
<option value="" selected disabled>请选择省</option>
<option value="1">北京</option>
<option value="2">河北</option>
<option value="3">上海</option>
<option value="4">山西</option>
</select>
<select name="city" id="city">
<option value="" selected disabled>请选择市</option>
<option value="1">北京市</option>
</select>
<select name="county" id="county">
<option value="" selected disabled>请选择区/县</option>
<option value="1">朝阳区</option>
<option value="2">海淀区</option>
<option value="3">东城区</option>
</select>
</div>
<div>马上咨询</div>
</div>
</div>
</div>
2.css
/*总体*/
.consulting{
width: 100%;
height: 530px;
padding-top: 60px;
}
.consulting>div{
width: 1148px;
height: 540px;
margin: 0 auto;/*居中*/
}
.consulting>div h2{
font-size: 44px;
font-weight: 500;
text-align: center;
letter-spacing: 2px;
width: 480px;
height: 80px;
line-height: 80px;
background-image: url('../image/consultSpecialist.png');
background-repeat: no-repeat;
margin: 0 auto;
}
.consulting .text{
font-size: 18px;
width: 100px;
float: left;
margin: 0;
color: black;
font-weight: 200;
}
.consulting .text+span{
font-size: 16px;
color: #909090;
float: left;
margin-top: 4px;
font-weight: 200;
}
.consulting>div>p{
color: #1665c0;
font-size: 22px;
line-height: 30px;
text-align: center;
padding: 25px 0 45px 0;
font-weight: 200;
}
.consulting .consulting_main{
width: 948px;
height: 290px;
padding: 0 100px 0 100px;
}
.consulting .consulting_main div:nth-child(1),
.consulting_main div:nth-child(2),
.consulting_main div:nth-child(3){
width: 49%;
margin-bottom: 25px;
display: inline-block;/*行内块元素*/
position: relative;
letter-spacing: 1px;
}
.consulting .consulting_main div h4{
width: 74px;
display: inline-block;
margin: 0 8px 0 0;
font-size: 16px;
font-weight: 200;
}
.consulting .consulting_main div input[type=text]{
width: 260px;
height: 38px;
line-height: 1.3;
border: 1px solid #e6e6e6;
border-radius: 2px;
background-color: #ffffff;
padding-left: 10px;
display: inline-block;
font-size: 16px;
}
.consulting .consulting_main div span{
position: absolute;
color: red;
margin: 10px 0 0 -10px;
}
.consulting .consulting_main .d_gender{
width: 30%;
margin-bottom: 25px;
display: inline-block;
position: relative;
}
.consulting .consulting_main .d_gender #gender{
height: 38px;
line-height: 1.3;
border: 1px solid #e6e6e6;
border-radius: 2px;
background-color: #ffffff;
padding-left: 10px;
display: inline-block;
font-size: 16px;
}
.consulting .consulting_main .d_gender #gender option{
font-weight: 100;
}
.consulting .consulting_main .d_province{
width: 68%;
margin-bottom: 25px;
display: inline-block;
position: relative;
}
.consulting .consulting_main .d_province select{
width: 150px;
height: 38px;
line-height: 1.3;
border: 1px solid #e6e6e6;
border-radius: 2px;
background-color: #ffffff;
padding-left: 10px;
display: inline-block;
font-size: 16px;
}
.consulting .consulting_main div:last-child{
display: block;
width: 240px;
height: 50px;
text-align: center;
line-height: 50px;
color: white;
background-color: #1565c0;
border-radius: 40px;
margin: 45px auto 90px;
font-weight: 100px;
letter-spacing: 2px;
transition: all .2s;
}
.consulting .consulting_main div:last-child:hover{
background-color: #4391d4;
}
第三部分——为什么选择太平洋保险?
1.html
此部分与第一部分布局类似
<div class="why">
<div>
<h2>为什么选择太平洋保险?</h2>
<div class="why_main">
<div>
<div class="w_mainu"><img src="../image/Face1.png"></div>
<div class="w_maind">
<span>27年经验</span>
<h4>专注做您的保险专家</h4>
<p>自创立以来专注保险主业,目前实现全保险牌照布局,连续十年入选《财富》500强,现为193位</p>
</div>
</div>
<div>
<div class="w_mainu"><img src="../image/Face3.png"></div>
<div class="w_maind">
<span>完善服务</span>
<h4>满足您所有的保险需求</h4>
<p>以作为一家负责任的保险公司为使命,坚持以客户需求为导向,推出超过100项保户服务</p>
</div>
</div>
<div>
<div class="w_mainu"><img src="../image/Face.png"></div>
<div class="w_maind">
<span>80万人员</span>
<h4>强大的团队为您服务</h4>
<p>建立超过80万高素质业务服务团队,遵循专业化原则,致力于提供一流及高效的客户服务</p>
</div>
</div>
</div>
</div>
</div>
2.css
.why{
width: 100%px;
height: 550px;
}
.why>div{
width: 1148px;
height: 564px;
margin: 0 auto;
}
.why>div h2{
margin-top: 60px;
font-size: 44px;
text-align: center;
margin-bottom: 80px;
color: #303234;
font-weight: 500;
letter-spacing: 2px;
line-height: 50px;
}
.why .why_main{
width: 1148px;
height: 314px;
}
.why .why_main>div{
width: 33.33%;
height: 314px;
float: left;
text-align: center;
}
.why .why_main>div .w_mainu{
width: 120px;
height: 120px;
margin: 0 auto 52px;
}
.why .why_main>div .w_mainu img{
width: 120px;
height: 120px;
border-radius: 50%;
transition: all .4s;
}
.why .why_main>div .w_mainu img:hover{
transform: scale(1.1);
}
.why .why_main>div .w_maind{
width: 280px;
height: 142px;
text-align: center;
margin: 0 auto;
}
.why .why_main>div .w_maind span{
font-size: 14px;
opacity: .8;
color: #7a7a7a;
letter-spacing: 1.75px;
}
.why .why_main>div .w_maind h4{
margin: 10px 0 0 0;
font-size: 16px;
font-weight: 500;
color: #303234;
letter-spacing: 2px;
}
.why .why_main>div .w_maind p{
font-size: 16px;
margin: 14px 0 0 0;
color: #494b4e;
line-height: 26px;
letter-spacing: 2px;
font-weight: 100;
}
下篇预告:最后一部分及底部栏、侧边栏!