<div style="color:#FFFFFF !important;">
<!-- A Dynamic content comes from from third party. -->
<p style="color:red;"> This should be white instead of red. </p>
<p>Test is test. This should also be white. </p>
<span> Check is check. This should also be white. </span>
<!-- Dynamic Content ends -->
</div>
如何让上面给出的 div 中的所有文本都变成白色。是否可以使用任何 jquery 或其他类似语言??
最佳答案
使用 Jquery children()
和 css()
函数覆盖样式,查看我的 FIDDLE
用于演示
关于html - 覆盖 div 内所有子项的内联样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18843592/