CSS3学习笔记-技术提示

css书写过程中的优先级

(1)display 及相关声明;

(2)position 及相关的声明;

(3) margin、padding 和 border 及相关声明;

(4)字体/文本相关声明;

(5)装饰相关声明。

样式表中的顺序按照html中出现的顺序进行编写

根据情况来书写后备代码

<!--[if lte IE 8]> <!-- IE 条件注释 -->
<link src="ie_only.css" rel="stylesheet" />
<![endif]--> 

腻子脚本(polyfill)指的是一段 JavaScript 代码,能够赋予浏览器未曾有过的功能。

要在页面中添加一段腻子脚本,首先要下载并将其保存在网站的一个文件夹中。

 html5shiv.js(http://code.google.com/p/html5shiv):让 IE8 及更低版本的 IE 识别 section、 article、nav 等 HTML5 元素。

 selectivizr(http://www.selectivizr.com):让 IE(6/7/8)支持::first-child 等高级 CSS 选择符。

 IE9.js(http://code.google.com/p/ie7-js):修复从 IE6 到 IE9 的很多 bug 和缺损 功能。

 CSS3Pie(http://css3pie.com):让 IE6 到 IE9 支持圆角、背景渐变、边框图片、盒 阴影、RGBa 颜色等可视化的 CSS3 功能。

 Respond.js(https://github.com/scottjehl/respond)让旧版本浏览器支持媒体查询。

 -prefix-free(http://lea.verou.me/projects)为需要厂商前缀的 CSS3 声明添加前缀(参 见第 4 章)。

 borderBoxModel.js(https://github.com/albertogasparin/borderBoxModel):让 IE6 和 IE7 支持 CSS3 的 box-sizing 属性。

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