css - 固定在底部的位置在 CSS 中不起作用
问题描述
我正在尝试在页面底部的小尺寸图像上绘制滑块和其他表格行格式,但如果有任何调整窗口大小,那么中间的这个表格请帮助我在 npm 中使用它,如果有任何解决方案请建议我..
Html:-
<div id="UsefulTipsDataCtrDiv" class="col-sm-12">
<div class="container">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<a class="left carousel-control" href="#myCarousel" data-slide="prev" style="width: 5%;background: none">
<span class="glyphicon glyphicon-chevron-left" style="color:black;"></span>
<span class="sr-only">Previous</span>
</a>
<div class="carousel-inner img-responsive"></div>
<a class="right carousel-control" href="#myCarousel" data-slide="next" style="width: 5%;background: none">
<span class="glyphicon glyphicon-chevron-right" style="color:black;"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<table class="tblsmallImages">
<tr class="carousel-inner-thumbnails"></tr>
</table>
</div>
CSS:-
.carousel-inner {
margin-left: 20%;
width: 60% !important;
max-height: 430px;
}
.tblsmallImages{
width:125px;
height:100px;
margin-right:5px;
margin-left:5px;
bottom: 0!important;
width: 90%;
}
.smallImages{
height:100px;
margin-right:5px;
margin-left:5px;
}
.carousel-inner-thumbnails{
height: 120px;
overflow-x: scroll;
margin-top: 10px;
position: absolute;
width: 90%;
display: flex;
}
#UsefulTipsDataCtrDiv{
padding:5px 5px 30px 5px;
}
解决方案
.carousel-inner {
max-height: 430px;
}
.tblsmallImages{
width:125px;
height:100px;
bottom: 0!important;
width: 90%;
margin:0 5%;
}
.smallImages{
height:100px;
margin-right:5px;
margin-left:5px;
}
.carousel-inner-thumbnails{
height: auto;
overflow: auto;
margin-top: 10px;
position: relative;
width: 100%;
display: flex;
background-color: #ccc;
padding: 0 5px;
}
.thumbnail {
min-width:18%;
width:auto;
margin:5px 1%;
}
.thumbnail img {
width:100%;
height:auto;
/* min-height:75px; */
}
/*@media only screen and (max-width: 480px) {
.thumbnail {
min-width:31.33%;
width:auto;
margin:5px 1%;
}
}*/
<div id="UsefulTipsDataCtrDiv" class="col-sm-12">
<div class="container">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<a class="left carousel-control" href="#myCarousel" data-slide="prev" style="width: 5%;background: none">
<span class="glyphicon glyphicon-chevron-left" style="color:black;"></span>
<span class="sr-only">Previous</span>
</a>
<div class="carousel-inner img-responsive"></div>
<a class="right carousel-control" href="#myCarousel" data-slide="next" style="width: 5%;background: none">
<span class="glyphicon glyphicon-chevron-right" style="color:black;"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="tblsmallImages">
<div class="carousel-inner-thumbnails">
<div class="thumbnail">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLN7GK_-yK_R_Qpz-v4mQPCwiMgYcPMz2Y3nk6-qFsZ79RHf1j">
</div>
<div class="thumbnail">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLN7GK_-yK_R_Qpz-v4mQPCwiMgYcPMz2Y3nk6-qFsZ79RHf1j">
</div>
<div class="thumbnail">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLN7GK_-yK_R_Qpz-v4mQPCwiMgYcPMz2Y3nk6-qFsZ79RHf1j">
</div>
<div class="thumbnail">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLN7GK_-yK_R_Qpz-v4mQPCwiMgYcPMz2Y3nk6-qFsZ79RHf1j">
</div>
<div class="thumbnail">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLN7GK_-yK_R_Qpz-v4mQPCwiMgYcPMz2Y3nk6-qFsZ79RHf1j">
</div>
</div>
</div>
</div>
试试这个代码。有时它会为你工作,如果有任何问题,请告诉我。
推荐阅读
- parallel-processing - 如何计算 3D 环面互连的直径?
- python - Docker执行在容器中找不到文件
- mysql - TypeError:令牌必须是字节
- rust - 如何使用 rwpi 重定位模型在没有静态基础的情况下修复 rust-lld 错误 SBREL 重定位到 xxx?
- python - PyjasperReport:ModuleNotFoundError:没有名为“pyreportjasper”的模块
- jax-rs - NullPointerException 使用 DropwizardAppExtension 和 JUnit5
- c++ - 排序 std::reference_wrapper 数组时出现问题,引用向量
- assembly - 为什么我应该在这个循环模拟中使用堆栈?
- docker - 如果服务已经在运行,我如何指示 docker-compose 不启动它?
- regression - 如何使用稳健的线性回归或其他用户选择的模型去趋势 xarray.DataSet(或 xarray.DataArray)?