-1
我想將我的圖像水平放置到中心,但我似乎無法使它工作,這就是我所擁有的。無法對齊圖像水平居中
.drugimg p img {
position: absolute;
align-items: center;
justify-content: center;
display: inline;
margin-left: 0 auto;
margin-right: 0 auto;
text-align: center;
width: 30%;
border: 3px solid #73ad21;
padding: 5px;
}
'drugimg'是什麼元素?你有這個元素的一些樣式?當你說你想要將圖像放在水平中心時,你的意思是水平的與什麼有關? – ands
如果您想要將圖片居中放置在父元素中的文本對齊... –