应用 Reset CSS 后,和其他标签失去了默认样式

发布于 2024-08-23 07:40:09 字数 291 浏览 2 评论 0原文

我发现我应该使用 Reset CSS 文件来制作网站,但是在我包含它之后,所有 标签都失去了样式。 不再是斜体, 不再是常量字体。

我通过添加 em { font-style: italic; 来修复它},但我不可能为所有失去样式的标签添加这个?

有什么想法吗?

谢谢,博达·西多。

I found that I should be using Reset CSS file for making websites, but after I include it, all the <em> and <code> tags lose their style. <em> is not longer italic and <code> is no longer constant font.

I fixed it by adding em { font-style: italic; }, but I can't possibly add this for all the tags that lost their style?

Any ideas why?

Thanks, Boda Cydo.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

野鹿林 2024-08-30 07:40:09

简单的方法是从重置中删除您不希望重新设置样式或想要保留的样式。重置CSS并不意味着您不能从中自定义或删除任何内容。

The simple way will be to remove the styles from reset that you don't want re-styled or want to preserve. Reset css does not mean that you can not customize or delete anything from it.

美人如玉 2024-08-30 07:40:09

我发现 CSS 重置很痛苦。最后,您基本上放回了默认情况下已有的样式。根据需要设置元素的样式要容易得多。

无 CSS 重置

我在这些重置中遇到的问题是,我发现自己声明的内容比我以前需要的多得多,只是为了让浏览器重新按照我想要的方式渲染内容。事实证明,我对许多元素的默认渲染方式非常满意。我喜欢带有项目符号的列表和带有粗体文本的强元素。

I found CSS resets to be a pain. In the end, you basically put back the styles that were already there by default. It's much easier to just style the elements as needed.

No CSS Reset

The problem I've had with these resets is that I then find myself declaring much more than I ever needed to just to get browsers back to rendering things the way I want. As it turns out, I'm perfectly happy with how a number of elements render by default. I like lists to have bullets and strong elements to have bolded text.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文