CSS重置,常见元素的默认样式 [英] CSS Reset, default styles for common elements

查看:142
本文介绍了CSS重置,常见元素的默认样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用CSS重置后,我想恢复为html元素的正常行为,如:p,h1..h6,strong,ul和li。

After applying a CSS reset, I want to get back to 'normal' behavior for html elements like: p, h1..h6, strong, ul and li.

现在当我说正常我的意思是eg p元素在使用时添加间距或回车喜欢的结果,或者h1标签的字体和粗体的大小以及间距。

Now when I say normal I mean e.g. the p element adds spacing or a carriage return like result when used, or the size of the font and boldness for a h1 tag, along with the spacing.

我意识到完全取决于我如何设置风格,但我想回到一些更常见的元素的正常行为(至少作为一个起点,我可以稍后调整)。

I realize it is totally up to me how I want to set the style, but I want to get back to normal behavior for some of the more common elements (at least as a starting point that I can tweak later on).

推荐答案

YUI提供了一个基本的CSS文件,将在所有'A级'浏览器中提供一致的样式。他们还提供了一个CSS重置文件,所以你可以使用它,但你说你已经重置了CSS。有关详情,请访问 YUI网站。这是我一直在使用,它的工作原理很好。

YUI provides a base CSS file that will give consistent styles across all 'A-grade' browsers. They also provide a CSS reset file, so you could use that as well, but you say you've already reset the CSS. For further details go to the YUI website. This is what I've been using and it works really well.

这篇关于CSS重置,常见元素的默认样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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