求一個(gè)方案(非node環(huán)境)將頁面引入的css文件中的class樣式提取出來轉(zhuǎn)換為標(biāo)簽的行內(nèi)樣式style,例如:將如下的格式<html><head> <style> p { color: red; } </style> <link rel="stylesheet" href="style.css"></head><body> <p>Test</p></body></html>style.cssp { text-decoration: underline;}轉(zhuǎn)換成為:<html><head></head><body> <p style="color: red; text-decoration: underline;">Test</p></body></html>
class樣式轉(zhuǎn)換為行內(nèi)樣式
寶慕林4294392
2019-03-05 13:15:40