Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 我想使我的图像垂直对齐:中间对齐(我从数据库动态获取图像)_Html_Css - Fatal编程技术网

Html 我想使我的图像垂直对齐:中间对齐(我从数据库动态获取图像)

Html 我想使我的图像垂直对齐:中间对齐(我从数据库动态获取图像),html,css,Html,Css,图像的宽度和高度彼此不同,我无法正确获取它们。他们将进入拇指链接的顶端 .thumb-links { display: block; position: relative; z-index: 2; text-align: center; cursor: pointer; height: 270px;} @media (max-width: 767px) { .thumb-links { max-width: 370px; margin-left: auto; margi

图像的宽度和高度彼此不同,我无法正确获取它们。他们将进入拇指链接的顶端

.thumb-links {
display: block;
position: relative;
z-index: 2;
text-align: center;
cursor: pointer;
height: 270px;}

@media (max-width: 767px) {
.thumb-links {
    max-width: 370px;
    margin-left: auto;
    margin-right: auto;
}}
.thumb-links img {
height: auto;
vertical-align:middle;
-moz-transition: 0.5s all ease;
-webkit-transition: 0.5s all ease;
-o-transition: 0.5s all ease;
transition: 0.5s all ease;}
将此css属性添加到拇指链接。

我通过此链接解决了此问题

.thumb-links{
     clear: both;
 }

我试过了,但都一样。我做了显示:内联块;图像高度选项:自动仍然没有响应。请为我们提供小提琴或演示。这样任何人都可以调查这个问题
.thumb-links{
     clear: both;
 }
.thumb-links {
position: relative;
z-index: 2;
text-align: center;
cursor: pointer;
height: 270px;
float:left;
width:270;
display:flex;
align-items:center;
justify-content:center;}