首页 > 解决方案 > 任何转换器可以将 css 样式表放入 html 中的样式标签中?

问题描述

编辑:标题应指样式属性。我的错。

我创建了一个小项目(html + css)来为电子邮件创建签名。但是,我刚刚意识到我只需要 html,不需要 css。有没有可以做的工具:

.signature_box{
    display: flex;
    position: relative;
}

至:

<div style="display:flex; position: relative;">...</div>

通过检测 div 有' class="signature_box"'?

标签: htmlcssstyles

解决方案


通过执行以下操作,您可以轻松地在 .html 中复制整个 .css:

<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

通过将您的样式包含在

<style></style>

编辑:

在此之后将您的代码复制到https://templates.mailchimp.com/resources/inline-css/它应该可以工作


推荐阅读