Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.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_Image_List_Alignment - Fatal编程技术网

Html 如何在列表中居中放置图像?

Html 如何在列表中居中放置图像?,html,css,image,list,alignment,Html,Css,Image,List,Alignment,如何对齐要居中的图像列表?我让它们彼此相距25像素。它们正在内联显示。现在我想把它们放在页面的中心。现在它们被向左移动 HTML 我尝试了文本对齐:居中在中。缩略图照片ul li和中。缩略图照片ul li img请更新以下css .thumbnail-photos ul li { display: inline-block; margin: 25px; width:120px;/*---any specific width to check----*/ } .thumbnail-photos u

如何对齐要居中的图像列表?我让它们彼此相距25像素。它们正在内联显示。现在我想把它们放在页面的中心。现在它们被向左移动

HTML


我尝试了
文本对齐:居中
中。缩略图照片ul li
中。缩略图照片ul li img
请更新以下css

.thumbnail-photos ul li {
display: inline-block;
margin: 25px;
width:120px;/*---any specific width to check----*/
}
.thumbnail-photos ul li img {
display:block;
margin:0 auto;
}

请更新以下css

.thumbnail-photos ul li {
display: inline-block;
margin: 25px;
width:120px;/*---any specific width to check----*/
}
.thumbnail-photos ul li img {
display:block;
margin:0 auto;
}

请更新以下css

.thumbnail-photos ul li {
display: inline-block;
margin: 25px;
width:120px;/*---any specific width to check----*/
}
.thumbnail-photos ul li img {
display:block;
margin:0 auto;
}

请更新以下css

.thumbnail-photos ul li {
display: inline-block;
margin: 25px;
width:120px;/*---any specific width to check----*/
}
.thumbnail-photos ul li img {
display:block;
margin:0 auto;
}

尝试在页面上居中-诀窍是指定包装容器的宽度:

.thumbnail-photos {
    width: 900px; /* any width you want */
    margin: 0 auto;     
}

尝试在页面上居中-诀窍是指定包装容器的宽度:

.thumbnail-photos {
    width: 900px; /* any width you want */
    margin: 0 auto;     
}

尝试在页面上居中-诀窍是指定包装容器的宽度:

.thumbnail-photos {
    width: 900px; /* any width you want */
    margin: 0 auto;     
}

尝试在页面上居中-诀窍是指定包装容器的宽度:

.thumbnail-photos {
    width: 900px; /* any width you want */
    margin: 0 auto;     
}


你可以试试
。缩略图照片{margin:0 auto;}
你能创建一个小提琴吗。调试jsfiddle.net会容易得多,完成后别忘了选择答案:)@AnkurAggarwal这是我创建的小提琴,你可以试试
。缩略图照片{margin:0 auto;}
你能创建小提琴吗。调试jsfiddle.net会容易得多,完成后别忘了选择答案:)@AnkurAggarwal这是我创建的小提琴,你可以试试
。缩略图照片{margin:0 auto;}
你能创建小提琴吗。调试jsfiddle.net会容易得多,完成后别忘了选择答案:)@AnkurAggarwal这是我创建的小提琴,你可以试试
。缩略图照片{margin:0 auto;}
你能创建小提琴吗。调试jsfiddle.net会容易得多,完成后别忘了选择答案:)@AnkurAggarwal这是我创建的一把小提琴,是的,在描述部分,我没有注意到,无论如何谢谢+1这是我要找的结果。谢谢。@blurfus这是我项目的一部分,您可以根据需要调整容器的宽度;如果您只需要四幅图像,可以设置
宽度:700px,它将在页面中居中显示。这是因为它使容器相对于文档居中(以及图像相对于容器居中)是的,在描述部分,我没有注意到,无论如何感谢+1这是我正在寻找的结果。谢谢。@blurfus这是我项目的一部分,您可以根据需要调整容器的宽度;如果您只需要四幅图像,可以设置
宽度:700px,它将在页面中居中显示。这是因为它使容器相对于文档居中(以及图像相对于容器居中)是的,在描述部分,我没有注意到,无论如何感谢+1这是我正在寻找的结果。谢谢。@blurfus这是我项目的一部分,您可以根据需要调整容器的宽度;如果您只需要四幅图像,可以设置
宽度:700px,它将在页面中居中显示。这是因为它使容器相对于文档居中(以及图像相对于容器居中)是的,在描述部分,我没有注意到,无论如何感谢+1这是我正在寻找的结果。谢谢。@blurfus这是我项目的一部分,您可以根据需要调整容器的宽度;如果您只需要四幅图像,可以设置
宽度:700px,它将在页面中居中显示。这是因为它使容器相对于文档居中(图像相对于容器居中)