在添加了<span>标签后,文本消失了
P粉226642568
P粉226642568 2023-08-13 19:16:16
0
1
520
<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>
P粉226642568
P粉226642568

全部回复(1)
P粉949848849

我认为有些基本的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: "&sect;;">
              <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;">&sect;</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>
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!