如何重置css中间的html文档? [英] How to reset css in middle of html document?

查看:195
本文介绍了如何重置css中间的html文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在页面中间重置css?我有主要风格,但在一个区域我想使用从tinyMCE生成的源码的样式。
所以在tinyMCE源是在编辑器中看起来像默认浏览器样式(或喜欢用户想要)的元素,但在其他页面使用样式从我的主要CSS和从它的内联样式。所以我得到混合的两个蚂蚁看起来不好。我不知道如何重置主风格,..没有iframe。

I wonder if there are any possibility to reset css in middle of page? I have main style, but in one area I would like to use style from tinyMCE generated source. So in tinyMCE source are elements which in editor looks like default browsers style (or like user wants), but in other pages uses style from my main css and from it self inline style. So I get mix of both ant it looks crappy. And I have no idea how to reset main style,.. without iframes.

感谢

推荐答案

要应用到页面的顶部,并且一组重置的规则适用于其余的?没有办法,不能做,对不起。

You mean, have a set of CSS rules to apply to the top part of a page, and a reset set of rules apply to the rest? No way, can't be done, sorry.

我这样的东西通常是将有问题的内容嵌入包装器< div class ='wysiwyg_html'> ,然后为该内容设置特定样式说明:

My approach to stuff like this is usually to embed the problematic content in a wrapper <div class='wysiwyg_html'> and then to set specific styling instructions for that content:

.wysiwyg_html p { display: inline }
.wysiwyg_html a { text-decoration: underline }
.... and so on

如果需要,您可以将整个重置样式表应用于 wysiwyg_html 中的所有内容。

If you want, you can apply a whole reset stylesheet to everything inside wysiwyg_html that way.

这篇关于如何重置css中间的html文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆