gpt4 book ai didi

html - Bootstrap 3 网格移动 View .span6?

转载 作者:太空宇宙 更新时间:2023-11-04 02:07:33 25 4
gpt4 key购买 nike

您好,我的网站有问题,我一直在尝试将我的卡片堆叠在一个和另一个下面,而不是在移动 View 中并排放置。问题是,如果我在 twitter-bootstrap-3 中使用 .span6,卡片会拉伸(stretch),我想保持相同的比例。我希望它与上面的元素选择相同。

网站:

https://teamhusky.net/

例子:

Mobile example.

我想像元素一样堆叠成员图像。

/*font change*/
@import url(https://fonts.googleapis.com/css?family=Arvo:700);
/**navbar regular*/

.navbar-fixed-top .nav {
padding: 15px 0;
}
.navbar-fixed-top .navbar-brand {
padding: 0 15px;
}
@media(min-width:768px) {
.navbar-fixed-top .navbar-brand {
padding: 15px 0;
}
}
/*font change*/
h1 {
font-family: 'Arvo', serif;
}
/*load*/
.no-js #loader { display: none; }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.load{
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(../img/load.gif) center no-repeat #34495e;

}

/*selection tabs*/

.about-tab {
height: 100%;
padding-top: 100px;
background:#E0E0E0;
padding-bottom: 100px;
}
.service-tab {
height: 100%;
padding-top: 100px;
background: #EEEEEE;
padding-bottom: 100px;
}
.project-tab {
height: 100%;
padding-top: 100px;
background: #fff;
padding-bottom: 100px;
}
.members-tab {
height: 100%;
padding-top: 100px;
background: #FAFAFA;
padding-bottom: 100px;
}
.contact-tab {
height: 100%;
padding-top: 100px;
background: #fff;
}
/*Google maps responsive*/

.google-maps {
position: relative;
padding-bottom: 75%;
height: 0;
overflow: hidden;
}
.google-maps iframe {
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
border: 0;
}


/*hover effect project tab*/

.hovereffect {
width: 100%;
height: 100%;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
background: #8dd8f8;
}
.hovereffect .overlay {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
padding: 50px 20px;
}
.hovereffect img {
display: block;
position: relative;
max-width: none;
width: calc(100% + 20px);
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.hovereffect:hover img {
opacity: 0.4;
filter: alpha(opacity=40);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.hovereffect h2 {
text-transform: uppercase;
color: black;
text-align: center;
position: relative;
font-size: 17px;
overflow: hidden;
padding: 0.5em 0;
background-color: transparent;
}
.hovereffect h2:after {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: black;
content: '';
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.hovereffect:hover h2:after {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.hovereffect a,
.hovereffect p {
color: black;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
.hovereffect:hover a,
.hovereffect:hover p {
opacity: 1;
filter: alpha(opacity=100);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/*navbar colour*/

.navbar-default {
background-color: #607d8b;
border-color: #ffffff;
font-family: 'Arvo', serif;
}
.navbar-default .navbar-brand {
color: #000000;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #000000;
}
.navbar-default .navbar-text {
color: #000000;
}
.navbar-default .navbar-nav > li > a {
color: #000000;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #000000;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #000000;
background-color: #ffffff;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: #000000;
background-color: #ffffff;
}
.navbar-default .navbar-toggle {
border-color: #ffffff;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #ffffff;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #000000;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
border-color: #000000;
}
.navbar-default .navbar-link {
color: #000000;
}
.navbar-default .navbar-link:hover {
color: #000000;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #000000;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #000000;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #000000;
background-color: #ffffff;
}
}
/*Parallax home*/

.ha-bg-parallax {
background: url("../img/kiruna.JPG") no-repeat fixed;
-moz-background-size: cover;
-o-background-size: cover;
-webkit-background-size: cover;
background-size: cover;
height: 100vh;
margin: 0 auto;
width: 100%;
display: table;
vertical-align: middle;
}
.ha-bg-parallax .ha-parallax-body {
display: table-cell;
vertical-align: middle;
}

/*typed.js*/
.typed-cursor{
opacity: 1;
-webkit-animation: blink 0.7s infinite;
-moz-animation: blink 0.7s infinite;
animation: blink 0.7s infinite;
}
@keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-webkit-keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-moz-keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}

/*member*/
.profile-card {
background-color: #222222;
margin-bottom: 20px;
}
.profile-info {
color: #BDBDBD;
padding: 25px;
position: relative;
margin-top: 15px;
}
.profile-info h2 {
color: #E8E8E8;
letter-spacing: 4px;
padding-bottom: 12px;
}
.jobtext{
display: block;
font-size: 12px;
color: #2196F3;
letter-spacing: 2px;
}
.memlink{
color: #2196F3;
padding: 10px;
}
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!--members start-->
<section class="members-tab" id="members">
<div class="container">
<div class="row text-center">
<div class="col-lg-12">
<h1>Members</h1>
<div class="container">
<div class="row">
<div class="col-xs-6">
<div class="profile-card text-center">
<div class="profile-info">
<div class="wow zoomIn" data-wow-delay="1s" data-wow-duration="1s"><img alt="edgaraxe" class="img-responsive" src="https://teamhusky.net/img/edgar.jpg"></div>
<h2 class="text-center">Edgar Axe</h2>
<div class="jobtext">
CEO and Lead Programmer of Team Husky.
</div>
<a class="fa fa-envelope fa-2x memlink" href="mailto:edgar@teamhusky.net"></a><br>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="profile-card text-center">
<div class="profile-info">
<div class="wow zoomIn" data-wow-delay="2s" data-wow-duration="1s"><img alt="Ahmed" class="img-responsive" src="https://teamhusky.net/img/edgar.jpg"></div>
<h2 class="text-center">Ahmed</h2>
<div class="jobtext">
Chairman of Team Husky.
</div>
<a class="fa fa-envelope fa-2x memlink" href="mailto:ahmed@teamhusky.net"></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section><!--Members end-->

最佳答案

问题是您已经告诉标记在移动设备上呈现 50%。您应该使用 col-xs-12 col-sm-6 而不是 col-xs-6

关于html - Bootstrap 3 网格移动 View .span6?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40430396/

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