我喜欢下面这段代码来创建一个表格;但是,我想在分数方程的右边有“x =”部分。目前,“x =”位于分数方程的左侧。
如何更改代码,以便“x =”在右边?
<style>
td.upper_line { border-top:solid 1px black; }
table.fraction { text-align: center; vertical-align: middle;
margin-top:0.5em; margin-bottom:0.5em; line-height: 2em; }
</style>
<table class="fraction" align="center" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="2" nowrap="nowrap"> <i>x</i> = </td>
<td nowrap="nowrap"> <i>x</i> <sup>2</sup> + <i>x</i> + 1</td>
</tr>
<tr>
<td class="upper_line">2 cos(<i>x</i>)</td>
</tr>
</table>
答案 0 :(得分:1)
这就是你追求的吗?我已将x =更改为a = x,因此等式看起来正确。
<table class="fraction" align="center" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap">
<i>x</i><sup>2</sup> + <i>x</i> + 1
</td>
<td rowspan="2" nowrap="nowrap">
= <i>x</i>
</td>
</tr><tr>
<td class="upper_line">
2 cos(<i>x</i>)
</td>
</tr> </table>
答案 1 :(得分:0)
<html>
<head>
<style>
td.upper_line { border-top:solid 1px black; }
table.fraction { text-align: center; vertical-align: middle;
margin-top:0.5em; margin-bottom:0.5em; line-height: 2em; }
</style>
</head>
<body>
<table class="fraction" align="center" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap"> <i>x</i> <sup>2</sup> + <i>x</i> + 1</td>
<td rowspan="2" nowrap="nowrap"> = <i>x</i> </td>
</tr>
<tr>
<td class="upper_line">2 cos(<i>x</i>)</td>
</tr>
</table>
</body>
</html>
答案 2 :(得分:0)
<td rowspan="2" nowrap="nowrap"> <i>x</i> = </td>
<td nowrap="nowrap"> <i>x</i> <sup>2</sup> + <i>x</i> + 1</td>
到
<td nowrap="nowrap"> <i>x</i> <sup>2</sup> + <i>x</i> + 1</td>
<td rowspan="2" nowrap="nowrap"> <i>x</i> = </td>