Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.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_Alignment - Fatal编程技术网

Html 我想要一些关于如何将名称与这些图像的中心对齐的帮助

Html 我想要一些关于如何将名称与这些图像的中心对齐的帮助,html,css,alignment,Html,Css,Alignment,这是我发现的一把小提琴,我想知道如何将“名字”与图像中心对齐。。。我试过使用宽度:100%;左:0;/右:0;没有成功。。我只使其与所有3个图像的中心对齐 HTML: 设计 名称 说明 名称 说明 名称 说明 要执行此操作,请将css代码更新为: .name { position: absolute; bottom: 0px; text-align: center; width: 31%; } 下次请查看引导或其他网格系统, 使用位置:绝对在这个场景中,是

这是我发现的一把小提琴,我想知道如何将“名字”与图像中心对齐。。。我试过使用宽度:100%;左:0;/右:0;没有成功。。我只使其与所有3个图像的中心对齐

HTML:


设计
名称

说明 名称
说明 名称
说明

要执行此操作,请将css代码更新为:

.name {
    position: absolute;
    bottom: 0px;
    text-align: center;
    width: 31%;
}
下次请查看引导或其他网格系统,
使用
位置:绝对
在这个场景中,是魔鬼在起作用。

更新你的
.name
类作为

.name {
    bottom:0px;
    text-align: center
}
.member{
位置:相对位置;
文本对齐:居中;
}
.成员.姓名{
位置:绝对位置;
最高:50%;
左:50%;
转换:翻译(-50%,-50%);
}

设计
名称

说明 名称
说明 名称
说明
您可以使用
文本对齐:居中
CSS属性。以下是更新后的
名称

.name {
    //position:absolute; // Remove this
    bottom:0px;
    text-align:center;
}
.name {
    /* position: absolute; */*remove this line*/
    bottom: 0px;
    text-align: center;
}
.name {
    //position:absolute; // Remove this
    bottom:0px;
    text-align:center;
}