gpt4 book ai didi

html - 如何使用 Bootstrap 和响应设置响应式页脚

转载 作者:行者123 更新时间:2023-11-28 01:20:16 25 4
gpt4 key购买 nike

谁能帮帮我。我想使用 bootstrap 和自定义 css 使我网站的页脚响应迅速。

请帮助我,我需要的输出就像底部 DesktopMobile 准备好的这两个。请帮我解决这个问题

桌面

enter image description here

手机

enter image description here

这是我当前的代码

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<footer>
<div class="container">
<div class="row">
<div class="col-12">
<h3 >Connect With Us</h3>
<div class="border-bottom"></div>
</div>
</div>
<div class="row padding-top-15px">
<div class="col-md-8 col-sm-12 col-xs-12">
<form>
<input type="text" placeholder="Name" required />
<input type="email" placeholder="Email" required />
<input type="submit" value="Subscribe" class="btn swatch-1">
<a href="#" data-toggle="modal" data-target="#invitefriendModal" class="btn">Refer a Friend</a>
</form>
</div>

<div class="col-md-4 col-sm-12 conl-xs-12">
<div class="footer-social">
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-google"></a>
<a href="#" class="fa fa-linkedin"></a>
<a href="#" target="_blank" >Legal</a> <span>Accreditation Number</span>
</div>
</div>
</div>
</div>
</footer>

最佳答案

@import url('http://fonts.googleapis.com/css?family=Open+Sans:100,200,300,400,500,600,700,800,900');
body {
font-family: Open Sans, Arial;
}
.btn.swatch-1{background-color: #20b8cd;color: #fff !important;}
.btn{font-size: 1em;line-height: 1.6em;border-radius: 0.2em;border:none;padding: 0.3em 2em;}
footer{
padding: 2% 4% 1%;
color: #fff;
background: #1b1b1b;
font-size: 0.8em;
}
placeholder{
padding:0px;
color:#fff;
}
footer input[type="text"],input[type="email"]{
background-color:transparent;
border-bottom:2px solid #fff;
border-top:none;
border-left:none;
border-right:none;
margin: 0px 20px 0px 0px;
font-family:Open Sans, Arial, sans-serif;
font-size:1.2em;
color:#fff;
}
footer input[type="email"]{
margin-right:10px;
}
footer a {
margin: 0 1em;
white-space: nowrap;
color: #fff;
line-height: 2em;
}

footer small {
display: block;
margin: 1em 1.7em;
font-size: 0.7em;
opacity: 0.4;
}

footer .socials i {
margin: 0em 0.1em;
font-size: 1.2em;
line-height: 1.6;
display: block;
}

footer .socials {
border: 1px solid #fff !important;
display: inline-block;
border-radius: 2em;
padding: 0;
}

footer a.btn {
border: 1px solid #fff !important;
text-transform:uppercase;
}
footer .btn {
text-transform:uppercase;
}
footer h3{
text-transform:uppercase;

}
footer h3:after{
height:5px;
width:60px;
background-color:#03d1c1;
margin-bottom:10px

}
footer .footer-social .fa {
padding: 10px;
font-size: 15px;
width: 35px;
text-align: center;
text-decoration: none;
margin: 0px 2px;
border-radius: 3px;
}

footer .footer-social .fa:hover {
opacity: 0.7;
}

.fa-facebook {
background: #3B5998;
color: white;
}

.fa-twitter {
background: #55ACEE;
color: white;
}

.fa-google {
background: #dd4b39;
color: white;
}

.fa-linkedin {
background: #007bb5;
color: white;
}

@media (max-width: 575.98px) {

footer {
font-size: 1em;
}
footer h3{
text-align: center;
text-transform: uppercase;
font-size: 1.8em;
font-weight: 600;
}
footer .border-bottom{
height: 5px;
max-width: 100px;
background-color: #46b8cd;
/* border-bottom: none; */
border-bottom: none !important;
margin: 0 auto 10px auto;
}
footer .footer-social{
margin-top: 20px;
}
footer input[type="text"], input[type="email"] {
margin-top: 10px;
width:100%;
}
footer .btn {
margin: 20px 0 0 0;

}
footer form{
text-align: center;
}


}

请查看下面的 css 我忘了在上面包含它。

关于html - 如何使用 Bootstrap 和响应设置响应式页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51546695/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com