让IE支持Css3属性(圆角、阴影、渐变)
>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2015年11月20日 10:35:10 星期五
http://fanshuyao.iteye.com/
项目下载地址及Demo:http://css3pie.com/
相关文档:http://css3pie.com/documentation/
相关文章:http://www.zhangxinxu.com/wordpress/?p=967
css3pie有三种处理方式,一种是使用htc文件,一种是使用js文件,一种是针对php使用php加载htc文件的。
第一种需要加上Content-type,但有些服务器默认不支持,还需要修改服务器的配置文件,好像挺麻烦的。
第二种最好,只是使用js(推荐使用)
使用js的优势:
Advantages of the JS version
Since it is a normal .js file, PIE.js does not suffer from some of the more annoying limitations of the PIE.htc behavior:
- You can load PIE.js from a different domain than the HTML page.
- You don't have to worry about your server not using the correct Content-type header for the file.
- Referencing the PIE.js file via a relative path is simpler since you only have to do it once in each HTML page.
- It is more easily integrated within JavaScript libraries.
第三种不说了。
第二种(js)使用方法:
官方文档:http://css3pie.com/documentation/pie-js/
Using PIE.js
If you've decided the above advantages outweigh the disadvantages for you, here's how you go about using PIE.js.
- Include the PIE.js script in your page, surrounded by a conditional comment to prevent it from being downloaded in other browsers:
<!--[if IE]>
<script type="text/javascript" src="path/to/PIE.js"></script>
<![endif]-->Note: The code above is for PIE.js 1.0; if you are using a PIE 2.0 beta build, then you will need to include the appropriate JS file for the current IE version:
<!--[if lt IE 9]>
<script type="text/javascript" src="path/to/PIE_IE678.js"></script>
<![endif]-->
<!--[if IE 9]>
<script type="text/javascript" src="path/to/PIE_IE9.js"></script>
<![endif]--> - Invoke the
PIE.attach(el)function for each element that needs CSS3 styling. Make sure you do this after the page's DOM has been fully loaded. For example, using jQuery:$(function() {
if (window.PIE) {
$('.rounded').each(function() {
PIE.attach(this);
});
}
});
If you are going to add new elements to the page via JavaScript after the fact, you will have to make sure your JS code calls PIE.attach(el) for each new element that needs CSS3 styling. Calling attach for a particular element more than once is safe (PIE will ignore the call if the element has already been attached), so you don't need to worry about filtering out elements.
Also, if you remove elements from the page that had PIE attached, you will need to call PIE.detach(el) to clean up their CSS3 rendering.
自己使用的:
之前加载PIE.js文件
<!--[if IE]>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/PIE.js"></script>
<![endif]-->
if (window.PIE) {
$('.css3,.form-control').each(function() {
PIE.attach(this);
});
}
附件为PIE文件
>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2015年11月20日 10:35:10 星期五
http://fanshuyao.iteye.com/
让IE支持Css3属性(圆角、阴影、渐变)的更多相关文章
- PIE使IE浏览器支持CSS3属性(圆角、阴影、渐变)
http://www.360doc.com/content/12/1214/09/11181348_253939277.shtml PIE使IE浏览器支持CSS3属性(圆角.阴影.渐变) 2012-1 ...
- 让IE6IE7IE8支持CSS3属性的8种方法介绍
我们都知道,IE浏览器暂不支持CSS3的一些属性.国外的工程师们,不安于此现状,他们总是尽量使用一些手段使IE浏览器也能支持CSS3属性,我觉得这些都是很有意义,很有价值的工作,可以推动整个技术领域的 ...
- 让IE6/IE7/IE8支持CSS3属性的8种方法介绍
我们都知道,IE浏览器暂不支持CSS3的一些属性.国外的工程师们,不安于此现状,他们总是尽量使用一些手段使IE浏览器也能支持CSS3属性,我觉得这些都是很有意义,很有价值的工作,可以推动整个技术领域的 ...
- 让IE6/IE7/IE8浏览器支持CSS3属性
让IE6/IE7/IE8浏览器支持CSS3属性 一.下载 您可以狠狠地点击这里:ie-css3.htc,这个玩意儿是让IE浏览器支持CSS3表现的关键东东. 二.上面的是什么东西 首先说说.htc文件 ...
- IE6-8支持css3属性
方法一.让IE6-8支持css3属性 <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shi ...
- 如何让IE 低版本下支持 css3属性
依赖源 该文件为 ie-css3.htc (特别提示.htc为二进制文件,只会在ie中识别,让IE浏览器支持CSS3的一些属性) 以下为依赖文件源码 通过源码我们可以看到 该文件在一定程度上 ...
- (转)让IE6/IE7/IE8浏览器支持CSS3属性
原文链接 http://blog.csdn.net/h5_queenstyle12/article/details/50437442 一.下载 搜索下载:ie-css3.htc,它是让IE浏览器支持C ...
- document.documentElement.style判断浏览器是否支持Css3属性
1.document.documentElement.style 属性定义了当前浏览器支持的所有Css属性 包括带前缀的和不带前缀的 例如:animation,webkitAnimation,msAn ...
- 高性能封装检测浏览器支持css3属性函数
css3出来已经很久了,现在来谈判断浏览器是否支持某个css3的属性虽说有点过时了,但是还是可以谈谈的,然后,此篇主要谈的不是判断是否支持,而是怎么封装更好,为什么这么封装,欢迎吐槽. 入题,判断浏览 ...
随机推荐
- 【HDOJ】1031 Design T-Shirt
qsort直接排序. #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAXN ...
- java基于xml配置的通用excel单表数据导入组件(五、Action处理类)
package xxxxxx.manage.importexcel; import java.io.File; import java.util.HashMap; import java.util.M ...
- Linux无线网络设置(wpa_supplicant的使用)
主机环境:Gentoo Linux 3.1.10 WPA Supplicant工具包可以让您连接到那些使用WPA的AP.因为还只是beta版,所以它的配置方法仍会常常变化——尽管如此,在大部分情况下它 ...
- (转载)设计模式学习笔记(十一)——Facade外观模式
(转载)http://www.cnblogs.com/kid-li/archive/2006/07/10/446904.html Facade外观模式,是一种结构型模式,它主要解决的问题是:组件的客户 ...
- 最短路(数据处理):HDU 5817 Ice Walls
Have you ever played DOTA? If so, you may know the hero, Invoker. As one of the few intelligence car ...
- POJ -- 2436
Disease Management Description Alas! A set of D (1 <= D <= 15) diseases (numbered 1..D) is run ...
- ubuntu 安装软件(apt源)
最近使用docker 构建python3的环境: 进入容器发现 连个vi命令多没有... 1.安装一个呗: apt-get 报错:root@22f41d59e3b2:~# apt-get instal ...
- 解决Qt5使用SSL的“qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method”错误
在使用Qt的网络组件连接某些服务器时, 会提示"qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method"的错误 ...
- Java反射_JDBC操作数据
</pre><p>使用反射 来操作 这里是练习反射的使用</p><p>链接数据库工具类</p><p><pre name= ...
- Android-Unable to resolve target 'android-8'