Css 将图像置于Div的中心
好吧,我知道这已经被问了一百万次了,但我用的是通常的技巧,它不起作用 代码如下: 我需要驾驶人的图像集中在圆形分区内 我的代码:Css 将图像置于Div的中心,css,Css,好吧,我知道这已经被问了一百万次了,但我用的是通常的技巧,它不起作用 代码如下: 我需要驾驶人的图像集中在圆形分区内 我的代码: <div style= 'margin: 0;margin-left: auto;margin-right: auto;display: block;'> <img src='http://fantasy-f1-league.com/images/drivers/Carlos_Sainz_Jr.png' width = '90'>&l
<div style= 'margin: 0;margin-left: auto;margin-right: auto;display: block;'>
<img src='http://fantasy-f1-league.com/images/drivers/Carlos_Sainz_Jr.png' width = '90'></div>
很多代码都不是我的,我使用的Dragula是基于我发现的一个演示的,我想其他一些CSS可能超过了我要做的
谢谢。您可以使用flex:
将此添加到保存图像的div中:
display: flex;
justify-content: center;
更新的提琴:请在你的问题中贴一个帖子