Display the image in the center of the page

前端 未结 3 942
一生所求
一生所求 2020-12-31 17:58

I have a image -- a loading image.

I want that image to be displayed in the center on the page. How can I do that?

The code I wrote is :

im         


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 18:55

    See W3C

    IMG.displayed {
        display: block;
        margin-left: auto;
        margin-right: auto 
    }
    
    ...
    

提交回复
热议问题