CSS改进
Windows Internet Explorer 8 是迄今为止 CSS 符合性最高的版本,它完全支持级联样式表 (CSS) 级别 2.1,并加强了对 CSS 3支持。下面是最为突出的几个亮点: 数据统一资源标识符 (URI)(最长32768个字符) 此机制允许网页作者直接在 URI 中嵌入小型实体,而不是使用 URI 标识检索实体的位置。此操作主要适用于在 CSS 或布局中使用的小图像(如项目符号)。
- 新伪类
以下是 Windows Internet Explorer 8 新增的内容: :before 和 :after 伪元素允许作者指定与元素的文档树内容有关的动态内容的位置。 :focus 指的是用户何时激活元素以使它可以执行任务。此伪类适用于元素具有输入焦点的情况。 Outline 可以突出显示元素,但不会影响其大小。它是 outline-color、outline-style 和 outline-width 的简化属性。
- 打印
为了简化打印,已添加了下列属性: page-break-inside widows orphans
- 表格布局
多年来,表格始终是 Internet 上的首选布局机制。在 Windows Internet Explorer 8 中,现在可以使用 display 属性将表格类型格式应用于非表格元素。实际上,CSS 表格比 HTML 标记更灵活;使用 CSS 规则创建的表格嵌套元素后即有效,而使用 HTML 创建的表格会关闭容器以避免意外嵌套。
下表收集了 Windows Internet Explorer 8 中支持的各种改进的 CSS 属性,并与 Windows Internet Explorer 7 进行了比较,内容一目了然。这些表未详尽列出 Windows Internet Explorer 8 支持的所有 CSS 属性;只显示了 Windows Internet Explorer 7 不支持或部分支持,而现在 Windows Internet Explorer 8 支持的 CSS 属性。
单元格中的“部分”值表示只能在该版本的 Windows Internet Explorer 中部分实现此功能。
伪类
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
active { sRules } : |
:active |
部分 |
是 |
after { sRules } : |
:after |
否 |
是 |
before { sRules } : |
:before |
否 |
是 |
focus { sRules } : |
:focus |
否 |
是 |
lang(C) { sRules } : |
lang(): |
否 |
是 |
列表
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ list-style-type :sStyle } |
list-style-type |
部分 |
是 |
颜色和背景
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ background-position :sPosition } |
background-position |
部分 |
是 |
字体和文本
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ font-weight :sWeight } |
font-weight |
部分 |
是 |
{ white-space :sWrap } |
white-space |
部分 |
是 |
{ word-spacing :sSpacing } |
word-spacing |
部分 |
是 |
生成的内容
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ content :sContent } |
content |
否 |
是 |
{ counter-increment :sCounter } |
counter-increment |
否 |
是 |
{ counter-reset :sCounter } |
counter-reset |
否 |
是 |
{ quotes :sQuotes } |
quotes |
否 |
是 |
边框和布局
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ border-collapse :sCollapse } |
border-collapse |
部分 |
是 |
{ border-spacing :sSpacing } |
border-spacing |
否 |
是 |
{ border-style :sStyle } |
border-style |
部分 |
是 |
{ caption-side :sLocation } |
caption-side |
否 |
是 |
{ empty-cells :sEmptyCells } |
empty-cells |
部分 |
是 |
定位
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ bottom :sBottom } |
bottom |
部分 |
是 |
{ display :sDisplay } |
display |
部分 |
是 |
{ left :sPosition } |
left |
部分 |
是 |
{ right :sPosition } |
right |
部分 |
是 |
{ top :sTop } |
top |
部分 |
是 |
{ z-index :vOrder } |
z-index |
部分 |
是 |
打印
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ orphans :nLines } |
orphans |
否 |
是 |
{ page-break-inside :sBreak } |
page-break-inside |
否 |
是 |
{ widows :nLines } |
widows |
否 |
是 |
用户界面
CSS 2.1 |
|
IE 7.0 |
IE 8.0 |
{ outline :sOutline } |
outline |
否 |
是 |
{ outline-color :sColor } |
outline-color |
否 |
是 |
{ outline-style :sStyle } |
outline-style |
否 |
是 |
{ outline-width :sWidth } |
outline-width |
否 |
是 |
CSS 3 |
|
IE 7.0 |
IE 8.0 |
{ box-sizing :sSizing } |
box-sizing |
否 |
是 |
函数
CSS 2.1 |
IE 7.0 |
IE 8.0 |
counter() |
否 |
是 |
attr() |
否 |
是 |
关键字
CSS 2.1 |
IE 7.0 |
IE 8.0 |
Inherit |
否 |
是 |
文本兼容性模式
Windows Internet Explorer 8 精心构建了一种新的布局引擎,该引擎提供全面的 CSS 2.1 支持和强大的 HTML 5 支持以及文档对象模型 (DOM) 的互操作性修补程序。默认情况下,将启用标准支持的最高级别。网站作者可以使用以下 META 标记在 Windows Internet Explorer 8 中选择 EmulationIE7 模式呈现:
<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />
开发工具
Windows Internet Explorer 8 中增强的开发工具可提供网页的内部元素,有助于研究和解决 HTML、CSS 和脚本方面的问题。包含下列工具: CSS 工具,用于显示您的网页加载的样式表所定义的各种规则。 脚本调试,一种内置轻型调试器,让您无需退出 Windows Internet Explorer 即可设置断点并查看客户端脚本。 版本模式切换,允许您切换到其他浏览器模式以测试内容是否符合标准符合性。 探查器,一种内置工具,用于显示浏览器在哪个执行阶段花费了大量时间,以便网页作者重点进行优化。 IE 8开发工具的界面如图所示,有关开发工具详细信息,请参阅下列网站: http://www.cnblogs.com/JustinYoung/
参考文档
IE8 White Paper(白皮书) 下载页面: http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ie8whitepapers&ReleaseId=567 IE8博客: http://blogs.msdn.com/ie/
原文:http://webteam.tencent.com/?p=999
本文链接:http://www.blueidea.com/tech/web/2009/6809.asp
出处:腾讯Webteam
责任编辑:bluehearts
上一页 IE8面向Web开发人员的功能改进 [2] 下一页
◎进入论坛网页制作、WEB标准化版块参加讨论,我还想发表评论。
|