`
mtnt2008
  • 浏览: 371051 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

CSS3 support for Internet Explorer 6, 7, and 8

阅读更多

 

What is it?

IE-CSS3 is a script to provide Internet Explorer support for some new styles available in the upcoming CSS3 standard.

How it works

If you're viewing this page in Internet Explorer, some of the elements have been rebuilt by the script in Vector Markup Language (VML), an IE-specific vector drawing language. VML supports things that are missing from IE's CSS implementation like rounded corners and blur effects.

How to use it

Just add CSS styles as you normally would, but include one new line:

.box {
  -moz-border-radius: 15px; /* Firefox */
  -webkit-border-radius: 15px; /* Safari and Chrome */
  border-radius: 15px; /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */

  -moz-box-shadow: 10px 10px 20px #000; /* Firefox */
  -webkit-box-shadow: 10px 10px 20px #000; /* Safari and Chrome */
  box-shadow: 10px 10px 20px #000; /* Opera 10.5+, future browsers and IE6+ using IE-CSS3 */

  behavior: url(ie-css3.htc); /* This lets IE know to call the script on all elements which get the 'box' class */
}

Issues and Workarounds

You would expect URLs in behavior: url(...) to be relative to the current directory as they are in a background-image: url(...) style for example, but instead Microsoft decided to ignore standards here and make them relative to the docroot instead. So behavior: url(ie-css3.htc) should work if ie-css3.htc is in the root directory of the site.

You will probably run into issues with z-index, especially if embedding one IE-CSS3 enabled element inside of another. There are two simple workarounds:

  • Set the z-index of the IE-CSS3 element to a number larger than its surrounding elements.
  • Make sure the IE-CSS3 element is positioned, such as with position: relative or position: absolute

Sometimes an IE-CSS3 element will show up at a slightly different position than the original, untouched element. There could be a few reasons for this:

  • You have broken tags somewhere in your markup, probably above the IE-CSS3 element.
  • You are experiencing misc IE6 and IE7 bugs. Try adding the styles zoom: 1 and/or position: relative to the IE-CSS3 element and its immediate parent. You could also try removing any margins on the IE-CSS3 element and/or its parent, use padding instead.

Styles and their status

Style What works What doesn't work
border-radius
  • Setting a radius for all four corners
  • Element borders
  • Setting a radius for individual corners separately
box-shadow
  • Blur size
  • Offset
  • Any color other than #000
text-shadow
  • Blur size
  • Offset
  • Color
  • The shadow looks a little bit different than it does in FF/Safari/Chrome, I'm not sure why

TODO

A better site for this script :)

This cat does not approve of square corners.

Thanks to Remiz Rahnas for writing the original script that this is based off of.

 

 

原文地址:

http://fetchak.com/ie-css3/

 

Download HTC

 

 

分享到:
评论

相关推荐

    Beginning CSS3 (pdf)

    Even ancient browsers, such as Internet Explorer (IE) 6 and 7, support most of CSS2.1. So, you’ll nd large parts of this book relevant even if you still need to support older browsers. Because CSS ...

    Internet Explorer开发文档2

    - **应用**:在《Internet Explorer Cascading Stylesheets (CSS) 2.1 Standards Support Document》中详细介绍了IE浏览器对于CSS2.1标准的支持情况。 - **重要性**:了解IE对于CSS2.1的支持有助于开发者更好地兼容...

    支持IE6,IE7,IE8矩形圆角的实例

    压缩包中的`CSS3 support for Internet Explorer 6, 7, and 8.htm`文件,很可能是详细演示如何在这些旧版IE浏览器中实现CSS3圆角的示例网页。打开这个文件,可以直观地看到实际效果,并学习如何在实际项目中应用这些...

    css-support:CSS浏览器支持信息的真实来源

    这些数据通常包括主流浏览器如Chrome、Firefox、Safari、Edge和Internet Explorer等,以及一些移动设备上的浏览器。 "css-support"包含的关键知识点: 1. **CSS属性支持**:了解各种CSS属性,如Flexbox、Grid布局...

    Internet Explorer 11 下载 Windows 系统 各版本下载

    在本篇文章中,我们将深入探讨有关Internet Explorer 11(IE11)浏览器在Windows系统下的各个版本的下载与安装细节。Internet Explorer是微软推出的一款经典的网页浏览器,它伴随了无数用户度过了互联网发展的黄金...

    [CSS] CSS 实战手册 第2版 (英文版)

    Second Edition, you'll find all-new online tutorial pages, expanded CSS 3 coverage, and broad support for Firebox, Safari, and other major web browsers, including Internet Explorer 8. Learn how to ...

    css guida(basic

    did preserve was that relating to bugs and limitations in the Internet Explorer line which has ceased development">book is for you All you really need before starting the book is a decent knowledge of...

    让bootstrap兼容IE8的respond.js

    然而,Bootstrap默认并不支持较老的浏览器,尤其是Internet Explorer 8(IE8)及以下版本,因为它们不支持媒体查询(Media Queries),这是实现响应式设计的关键部分。`respond.js`是一个轻量级的JavaScript库,由...

    jQwidgets 3.6.0

    Use a reliable, CSS compliant JavaScript library based jQuery, HTML5 and CSS3.The product supports all major desktop and mobile web browsers - Internet Explorer 7.0+, Firefox 2.0+, Safari 3.0+, Opera...

    10个很棒的 CSS3 开发工具 推荐

    1. CSS3 Pie:这是一个JavaScript库,可以使Internet Explorer 6到8支持CSS3的一些特性,如圆角、阴影和渐变,弥补了这些老版本浏览器的不足。你可以通过访问[CSS3 Pie](未提供链接)来了解更多信息。 2. CSS3 ...

    IE7-WindowsXP-x86-chs

    6. **Improved CSS and standards compliance(CSS和标准兼容性的改进)**:尽管仍存在一些问题,但IE7对CSS和Web标准的支持比其前身有了显著提高。 **知识点二:Windows XP** Windows XP是微软在2001年发布的个人...

    Web标准的创造力(完整标签版+页码修正)

    This full-color book's examples are not just stunning to look at, but also fully standards-compliant, up-to-date, and tested in current browsers including Internet Explorer 7. Playing by the rules ...

    HTML5入门(css3+js api+html新标签)

    ### HTML5 入门指南:探索 CSS3 和 JS API 的新功能 #### 一、HTML5 的发展历程 HTML5 的发展不仅仅是 HTML 本身的进化,它还涵盖了 CSS 和 JavaScript API 的进步。HTML5 起源于 Web Applications 1.0 的草案,由...

    margin在firefox与IE的兼容性设计

    在不同浏览器之间,CSS的解析和渲染可能存在差异,尤其是老版本的Internet Explorer(IE)和Firefox。标题提到的问题“margin在firefox与IE的兼容性设计”正是这种差异的一个典型例子。 在CSS中,`margin`属性用于...

    IE7-WindowsXP-x86-chs.rar

    **Internet Explorer 7 (IE7)** 是微软开发的一款网络浏览器,它是继 IE6 后的一个重大更新,于2006年发布。在IE7中,微软引入了多项新特性与改进,以提升用户体验和安全性: 1. **Tabbed Browsing(标签浏览)**: ...

    弹出层锁窗口 背景变灰 支持Firefox ie6 ie7 opera safari

    例如,对于旧版本的Internet Explorer(如IE6、IE7),可能需要使用特定的滤镜(如`filter`)来实现透明效果,并使用条件注释或现代izr.js等库来添加兼容性补丁。 5. JavaScript实现(JavaScript Implementation)...

    HTML5&CSS3网页制作:支持视频和音频的浏览器.pptx

    例如,Internet Explorer 8及更早版本不支持`<video>`元素,而其他如Firefox 3.5+、Opera 10.5+、Chrome 3.0+和Safari 3.2+则开始支持这些新元素。因此,为确保跨浏览器兼容性,通常需要提供多种格式的媒体文件,以...

Global site tag (gtag.js) - Google Analytics