gpt4 book ai didi

html - 一些 div 在 Bootstrap V3 中没有正确响应

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

我有一个问题困扰了我一段时间。它应该很简单,我就是想不出来。

基本上,在 Chrome 上,页面上创建的大部分 div http://loveireland.evolvedublin.com/tours/更改浏览器大小时正确调整大小,但有几个相互重叠。在 768px 和 991px 之间(媒体查询),国家蜡像馆的帖子与都柏林动物园重叠。这种情况发生在页面下方的其他几篇文章中,但页面的大部分内容都没有问题。

这在 Firefox 中不是问题。

此外,当屏幕低于 767px 时,大多数 div 会垂直重叠。

我试过添加 <div class="clearfix"></div>在不同的位置。我尝试了 col-**-4 的不同变体这没有帮助,我也尝试过修改花车,但似乎无法使任何工作正常进行。

帖子 HTML 示例:

<div id="post-250" class="post-250 tours type-tours status-publish hentry col-lg-4 col-md-4 tour-thumb element-item" >
<div class="tour-frame">
<div class="tour-thumb-img">
<a href="http://loveireland.evolvedublin.com/tours/dublin-zoo/">
<img src="http://loveireland.evolvedublin.com/wp-content/uploads/2014/05/Dublin-Zoo2.jpg" class="img-responsive" alt=""/>
</a>
</div><!--tour-thumb-img-->
<div class="tour-thumb-text">
<!--TOUR TITLE-->
<h2 class="az za"><a href="http://loveireland.evolvedublin.com/tours/dublin-zoo/">Dublin Zoo</a></h2>
<!--TOUR EXCERPT-->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mattis semper lorem, in volutpat mi adipiscing se
<div class="thumb-footer">
<div class="tripadvisor">
<img src="http://loveireland.evolvedublin.com/wp-content/themes/loveireland/images/trip-advisor-icon.png" class="trip-icon" alt="Trip Advisor Icon" />
</div><!--trip-advisor-->
<div class="green-btn">
<a href="http://loveireland.evolvedublin.com/tours/dublin-zoo/">VIEW TOUR</a>
</div><!--green-btn-->
</div><!--thumb-footer-->

<div class="clearfix clear"></div>

</div><!--tour-thumb-text-->

</div><!--tour-frame-->

使用的 CSS:

.tour-thumb{
margin: 0 0 30px 0;
}

.tour-frame{
border: 1px solid #e5e5e5;
background-color:#ffffff;
height:100%;
}

.tour-thumb-text{
padding: 0 10px 20px 10px;}

.tour-thumb a{
text-decoration:none;}

@media(max-width:767px){}
@media(min-width:768px){.tour-thumb{max-width: 357px !important; height: 390px;}}
@media(min-width:992px){.tour-thumb{max-width: 233px !important; height: 350px;}}
@media(min-width:1200px){.tour-thumb{max-width: 290px !important; height: 350px;}}

.tour-thumb h2{
font-size:12px;
font-weight:bold;
text-transform: uppercase;}

.tour-thumb h2 a{
color: #000000;
letter-spacing:2px;}

.tour-thumb h2 a:hover{
text-decoration:underline;}

.tour-thumb p{
font-size:14px;
letter-spacing:1px;}

.tour-thumb-img{
position:relative;}

.tour-thumb-price{
background: rgb(255,255,255);
background: rgba(255,255,255,0.9);
/*box-shadow: 0px 0px 10px #999999;*/
border: 1px solid #e5e5e5;
border-top: none;
position: absolute;
top:0;
right: 10px;
text-align:center;
padding: 10px;}

.tour-thumb-price h3{
font-size:18px;
font-weight:bold;
color:#8ac736;
padding: 0 0 0 0;
margin: 0 0 0 0;}

.tour-thumb-price p{
font-size:8px;
font-weight:bold;
padding: 0 0 0 0;
margin: 0 0 0 0;}

.thumb-footer{
display:block;
padding-top:10px;}

.tour-thumb .social{
display:inline-block;
float:left;
padding: 6px 0 6px 0;}

.tour-thumb .social img{
border:none;
margin-right:10px;}

.tour-thumb .social a{
color: #ffffff;}

.tour-thumb .green-btn{
float:right;
position:absolute;
right:20px;
/*margin-top:13px;*/}

.tour-thumb .tripadvisor{
/*margin-bottom:30px;*/
float:left;}

.tripadvisor img.trip-icon{
display:inline-block;
margin-top:4px;
float:left;}

.TA_cdsratingsonlynarrow{
display:inline-block;
float:left;}

.tour-detail .cdsROW.narrow{
text-align:left !important;
background-color:#fafafa; !important}

.tour-thumb .cdsROW.narrow{
text-align:left !important;
background-color:#ffffff; !important}

如前所述,这在 Firefox 中有效,但是,当屏幕小于 767px 时,列实际上不会调整大小,这在 Chrome 中也不会发生,这很奇怪!

希望有人能提供帮助,因为我很困。

干杯

最佳答案

在您发布的链接中,div 添加了 position:absolute 和 left 和 top 值,删除它或尝试覆盖它:

@media (min-width: 768px){
.tour-thumb {
position: relative !important;
left: auto !important;
top: auto !important;
float: left;
}
}

关于html - 一些 div 在 Bootstrap V3 中没有正确响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23513621/

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