As we all know, emails must have inline styles to take effect.
All external styles of web pages must be converted into internal styles called email templates. Are there any good plug-ins?
巴扎黑2017-05-18 10:55:51
https://github.com/Rozbo/html...
html-packer can take html's <script>, <link>, and <img> (including *.svg sources) tags into html-self.
More than that, it also can compress to minimize it.
I have never tried it. From the introduction, this plug-in seems to work. It is said that it can not only convert css, but also pictures and svg. Test it yourself. . .
PHP中文网2017-05-18 10:55:51
https://www.google.com/#safe=...
There are a lot of them on github. . Why don’t you google it
给我你的怀抱2017-05-18 10:55:51
This should help you, gulp plug-ingulp-inline-css
https://www.npmjs.com/package...
世界只因有你2017-05-18 10:55:51
I don’t know about the plug-in
But you can put the css into any editor
and then replace the text with regular expressions
just change the style to the internal style format
For example:
.inner {
width: 300px,
height: 500px
}
First go to the classname line: .*{n
and replace it with the ``null character.*{n
替换为``空字符
在去掉 } 为 空
然后匹配 ^s*
为 "
去:
为=
去n
Remove} to be empty
Then match ^s*
to "
:
for =
go to n
...style="width=300;height=500px"
If there are a lot of tags,
write all the above processes into js, match the corresponding tags through classname, and add the corresponding styles
Isn’t this what you call a template plug-in script
It’s better to ask for others than to ask for yourself🎜 🎜goodluck🎜