防止meyer重置css乱搞动态内容 [英] prevent meyer reset css to mess with dynamic content

查看:173
本文介绍了防止meyer重置css乱搞动态内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站实现Eric Meyer的reset.css,工作很好,但它是一个小问题。由于这个CMS用户可以自由格式化他们想要的文章的内容,并重置CSS重置其文本的格式。

I implement the Eric Meyer's reset.css in my website, and works great, but it was a little problem. As this a CMS users are free to format the content of their articles as they want and the reset CSS resets the formatting of their text.

任何想法如何我们可以防止重置.css继承传播到动态内容?

Any ideas how we can prevent reset.css inheritance to propagate to the dynamic content?

您输入的内容超过欢迎。

All you input is more than welcome.

推荐答案

它将总是传播(这就是reset.css的点),但如果你还没有这样做,你应该确保reset.css是第一个样式表链接到您的网页 - 任何自定义样式将覆盖重置样式。

It will always propagate (that's kind of the point of reset.css :)), but if you're not already doing so, you should of course make sure that reset.css is the first stylesheet linked in your pages - any custom styles will then override the reset styles.

如果问题是样式是太重置,你想更明智为动态内容设置默认值(例如加权字体大小,边距,行高等),您可以创建自己的基线CSS样式,并仅使用ID选择器将其应用于动态内容区域。

If the problem is that the styles are "too reset" and you'd like a more sensible set of defaults (e.g. weighted font sizes, margins, line-height etc.) for your dynamic content you could create your own baseline CSS styles and apply them only to the dynamic content area using an ID selector for example.

这篇关于防止meyer重置css乱搞动态内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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