Bootstrap4.x 新增

页面默认声明

(1)每个元素都声明了box-sizing属性

(2)全局字体未设置但推荐使用16px

(3)body上声明了全局的font-family, line-height,text-align,bankground-color :#fff;

字体声明

采用了设备字体栈的模式,不同的设备采用不同的字体,而不是以前的默认值(Helvetica Neue, Helvetica, and Arial)

标题标签和段落标签

移除了margin-top 增加了margin-bottom   h标签  .5rem p标签 1rem

列表标签

移除margin-top ul 增加了margin-bottom:1rem 嵌套的li不含margin-bottom

表单标签

(1)去掉了<fieldset>的默认样式,可以直接用作容器包裹

(2)重设了<legend>标签的样式,可以当标题来使用

(3)<label>设置了display:inline-block,可以设置margin

(4) <input> <select> <textarea> <button>被尽量的标准化,去除了margin设置了line-height:inherit;

(5)<textarea>标签将resize:both 设置成了resize:horizontal

Address地址标签

(1)将浏览器默认的字体样式从italic设置成了normal

(2)line-height:inherit;

(3)margin-bottom:1rem;

(4)换行依旧使用<br>

引用标签<Blockquote>

有默认的margin:1em 40px;变为margin:0 0 1rem;

缩写标签<abbr>

增加了样式使其更为standout

<detail>标签中的<summary>标签(用于描述文档或文档的细节)

增加了cursor:pointer

<pre>标签

取消了margin-top属性,将margin-bottom的单位改成了rem

原文地址:https://www.cnblogs.com/goOtter/p/9693627.html