为什么需要重置浏览器? [英] Why is there the need for browser resets?

查看:90
本文介绍了为什么需要重置浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,这可能不是最好的标题,我知道为什么,我们需要重置浏览器:因为浏览器设置了不同的默认值.

Okay that's probably not the best title, I know why we need browser resets: because browsers have different defaults set.

我的标题太长了,问题是:

My question that was too long to put into a title is:

如果每个人都需要90%的时间使用重置样式表,为什么浏览器需要设置默认样式?我们还是要删除它们,对吧?

If everyone needs to use a reset stylesheet 90% of the time, why do browsers need to set default styles? We're just going to remove them anyways, right?

推荐答案

因为默认情况下某些规则有意义:

Because certain rules make sense by default:

  • 表格单元格具有 display:table-cell;
  • < b> 使文本变为粗体,< i> 使文本变为斜体
  • 各段之间应有空格
  • 无序列表应显示为项目符号列表
  • Table cells have display:table-cell;
  • <b> makes text bold, <i> makes text italic
  • Paragraphs should have space in between them
  • Unordered lists should be displayed as bulleted lists

问题不是浏览器具有默认值,而是默认值都不同.

The problem isn't that browsers have defaults, it's that the defaults are all different.

这篇关于为什么需要重置浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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