Reset.css,然后是 Set.css

发布于 2024-09-05 15:43:30 字数 656 浏览 3 评论 0原文

在开始布置我的 html 设计之前,我已经有一段时间使用 reset.css 文件来重置所有内容。

重置的好处在于它允许人们更好地控制所有浏览器的属性,例如边距、填充、行高等。本质上是 css 文件的扁平化。

现在,为了让心跳再次跳动,我需要一个“set.css”文件。所以我所做的是创建一个 Html 文件,其中包含页面上所有可能的元素,然后设置 h1、h2、p、td 等的填充、边距等。

我需要一些帮助,因为我不确定默认值通常是什么。我查看了 Firefox 默认 css 文件,该文件用于在原始 html 文件上生成所有这些属性,但它并没有涵盖我在开发网站时可能想到的所有场景。

以下是 set.html 文件(正在进行中的工作)的示例,该文件可用作 lorem ipsum 填充程序,添加到 cms 中的首页,然后使用“set.css”文件设置样式

http://www.sixfoot.co.za/labs/Html-Css/set.html

如果有人知道是否存在类似 set.css 文件的文件,或者有人可以告诉我在重置 css 时的情况下,一般填充和边距是什么,我将不胜感激。

干杯, 詹姆斯

I have, for a while now been using a reset.css file to reset everything before I start laying out my html designs.

The reset is great in that it allows one to better control attributes such as margins, padding, line-height etc for all browsers. In essence the flatliner of css files.

Now to get the heart beating again, I need a "set.css" file. So what I have done is created an Html file with all the possible elements on the page to then go and set the padding, margins etc of the h1, h2, p, td etc.

I need some help with this as I am not sure what the defaults normally are. I had a look at the Firefox default css file that's used to generate all these attributes on a raw html file but it doesn't cover all the scenarios I could come up with when developing a site.

Here's an example of the set.html file (a work in progress) which can be used as a lorem ipsum filler to add to your first page in a cms and then to style with a "set.css" file

http://www.sixfoot.co.za/labs/Html-Css/set.html

I'd appreciate it if someone knows if something like a set.css file exists or if someone could tell me what the general padding and margins are in cases like this when you have reset the css.

Cheers,
James

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

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

发布评论

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

评论(4

安穩 2024-09-12 15:43:30

这听起来类似于适用的 YUI 的 base 文件格式化为主。它的创建是为了与 YUI 的字体和网格设置一起使用,但仍然适用于一般用途。

我想在设置这些值时,如果不使用第三方文件,我会选择对我正在设计的网站有意义的内容。但这是一项棘手的工作,因为我发现 CSS 很难使用。

This sounds similar to the YUI's base file which applies formatting to the main. It was created to be used with YUI's settings for fonts and grids but is still applicable for general use.

I guess when setting these values, if not using a 3rd party file, I pick something which is meaningful to the site I'm styling. A tricky job though as I find CSS a pain to work with.

深爱成瘾 2024-09-12 15:43:30

没有“标准”,这就是重置存在的原因。

我从未听说过 set css 文件,虽然我理解它的要点,但与其创建两个单独的文件,不如将其合并为 1。列出两次规则的效率很低。

我总是推动的唯一一件事是段落按钮上的 7px 填充。

我还喜欢: td 标签上的 padding: 0 10px 7px 0

There is no "standard", that's why the reset exists.

I've never heard of a set css file, and while I understand the point of it, rather than creating two separate files it should be merged into 1. It is inefficient to have rules listed twice.

The only thing that I always push is 7px of padding on the button of paragraphs.

I also like: padding: 0 10px 7px 0 on td tags.

<逆流佳人身旁 2024-09-12 15:43:30

我需要一些帮助,因为我不确定默认值通常是什么。

CSS 定义默认样式表:附录 D. HTML 4 的默认样式表

I need some help with this as I am not sure what the defaults normally are.

CSS defines a default stylesheet: Appendix D. Default style sheet for HTML 4

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