<p>我是一个学习Html设计电子邮件模板的新手。我需要在符号前面添加文本,并确保文本在下一行保持对齐。我正在使用<li>标签来正确对齐符号后的文本。但是由于某种原因,它似乎不起作用。</p>
<p>在添加<li>标签之后,文本不显示,它消失了。如果我删除<li>,文本又重新出现了。我不确定这种行为的原因是什么。非常感谢任何帮助。提前致谢。</p>
<pre class="brush:php;toolbar:false;"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Browser</title>
</head>
<div class="b opaf v" style=font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%>
<table cellpadding=0 style=border:none;vertical-align:top width=100%>
<tr>
<td align=left class=x style=font-size:0;word-break:break-word>
<div style=text-align:left>
<p style=margin:0;text-align:left><span style=font-size:12px;font-family:Arial,sans-serif;font-weight:400;color:#54565b;line-height:14px><span style=color:inherit;font-weight:inherit;font-family:inherit;font-size:65%;vertical-align:4px;line-height:0>&sect;</span><span><ul><li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li></ul></span>
</span>
</p>
</div>
</td>
</tr>
</table>
</div>
<script src="script.js"></script>
</body>
</html></pre>
我认为有些基本的HTML结构没有遵循。我相信这是期望的输出。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="style.css" /> <title>Browser</title> </head> <body> <div class="b opaf v" style="font-size: 0; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;"> <table cellpadding="0" style="border: none; vertical-align: top; width: 100%;"> <tr> <td align="left" class="x" style="font-size: 0; word-break: break-all;"> <div style="text-align: left;"> <ul style="margin: 0; padding-left: 20px; list-style-type: "§;"> <li style="font-size: 12px; font-family: Arial, sans-serif; font-weight: 400; color: #54565b; line-height: 14px; position: relative;"> <span style="color: inherit; font-weight: inherit; font-family: inherit; font-size: 65%; vertical-align: 4px; line-height: 0;">§</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </li> </ul> </div> </td> </tr> </table> </div> <script src="script.js"></script> </body> </html>