CSS中是否可以清除所有字体家族+字体大小样式声明? [英] Is there a way in css to clear all font-family + font-size style declarations?
本文介绍了CSS中是否可以清除所有字体家族+字体大小样式声明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个页面,内容是cms / wysiwyg / ms梦night。
I have a page which is a cms/wysiwyg/ms word nightmare.
它从数据库中提取了许多文本段落,其中一些保留了ms word的内容奇怪的html标签-包括字体声明!!!啊!
It pulls many paragraphs of text from a database, some of which have retained ms word's bizarre html tags - including font declarations!!! ahh!
在一句话中,我可以看到以下内容:
In one sentence I can have things like:
<span style="font-family:Verdana">this is some</span>
<span style="font-family:arial">ugly text!</span>
我想知道是否有一种方法可以删除所有字体系列和字体大小的样式,因此它们
I was wondering if there is a way of removing all font-family and font-size styles so they will adapt the master stylesheet css?
如果可以避免的话,我宁愿不要陷入大量的preg_replace条件。
谢谢
I'd prefer to not get into massive preg_replace conditions if I can avoid it. Thanks
推荐答案
CSS:
span {
font-family: initial !important;
font-size: initial !important;
}
这篇关于CSS中是否可以清除所有字体家族+字体大小样式声明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文