猿问

请问<pre></pre>标签内内容有更好的办法居中吗?我只能用空格的

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>平方根</title>

</head>

<body>

<p>

<pre>              公式:x<sup>2</sup>+x=0 解<sub>:</sub> x<sub>1</sub>=0 x<sub>2</sub>=-1

</pre>

</p>

</body>

</html>


qq_戒律_0
浏览 1324回答 1
1回答

joffyzou

添加一个style样式不行么?pre {     text-align: center; }
随时随地看视频慕课网APP
我要回答