text-align:center works in chrome, doesn't work in safari

早过忘川 提交于 2020-03-16 05:42:25

问题


This is how I use it.

HTML

<h1>text</h1>

CSS

h1 {
    text-align: center;
}

In Chrome everything works good, but aligned to the left in Safari. why that happens in Safari?


回答1:


For Safari

text-align: -webkit-center;


来源:https://stackoverflow.com/questions/35679627/text-aligncenter-works-in-chrome-doesnt-work-in-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!