If the image link is in an online format, the image cannot be centered in preview mode, even if you have set the centering css code for the image

If the image link is in an online format, the image cannot be centered in preview mode, even if you have set the centering css code for the image
如果圖像鏈接是在線格式,那麼圖像無法在预览模式居中顯示,即使您已經對圖像設置了居中的css代碼

![](https://cdn.up-timely.com/image/1/content/6120/ZuEnmQoMEE2kiRzTT6wsZnEDfudOnyinA.jpg)

I have centered the image in css and it works great in source mode and read mode, but why does it behave differently in preview mode than source mode and read mode? That’s why I think this is also a wrong form of expression. You can try it yourself to see the effect.
我已經在css中對圖像設置了居中處理,它在源碼模式和閱讀模式下表現的非常好,但是為什麼在預覽模式下會表現的與源碼模式和閱讀模式不同呢?所以我才認為這也是一個錯誤的表現形式。您可以自己好好試試看效果。

img {
    display: block;
    margin: 0 auto;
}


1.3.7
Windows10
特此報告!希望能在下個版本中修復它。非常感謝!

Preview mode image centering error reproduction process
預覽模式圖像居中錯誤重現過程
Preview mode image centering error reproduction process.zip (318.8 KB)

Try putting a space before the embed. so, <space>![]()

 ![](https://cdn.up-timely.com/image/1/content/6120/ZuEnmQoMEE2kiRzTT6wsZnEDfudOnyinA.jpg)

Although appending spaces can be centered,
But you can’t use this method every time! You still need to fix this. A setting item can be provided to allow users to enable or disable online image centering in preview mode.

1 Like