Angular4抱怨HTML中的中心元素为未定义的函数

时间:2017-08-06 10:42:48

标签: javascript html angular

我可以用什么其他标签代替<center> <\center>,因为angular4抱怨中心是一个未定义的函数

1 个答案:

答案 0 :(得分:2)

尝试1 编辑

<center>This text will be centered.
<p>So will this paragraph.</p></center>

TRY 2 (CSS替代方案)编辑

<div style="text-align:center">This text will be centered.
<p>So will this paragraph.</p></div>

TRY 3 (CSS替代方案)编辑

<p style="text-align:center">This line will be centered.<br>
And so will this line.</p>

我希望这会有所帮助。