博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
让IE支持Css3属性(圆角、阴影、渐变)
阅读量:7122 次
发布时间:2019-06-28

本文共 2367 字,大约阅读时间需要 7 分钟。

>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 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.

  1. Include the PIE.js script in your page, surrounded by a conditional comment to prevent it from being downloaded in other browsers:
    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:
  2. 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 (window.PIE) {        $('.css3,.form-control').each(function() {            PIE.attach(this);        });}

 

​附件为PIE文件

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2015年11月20日 10:35:10 星期五

http://fanshuyao.iteye.com/

转载地址:http://smxel.baihongyu.com/

你可能感兴趣的文章
介绍一款Java的方法入参校验工具
查看>>
不借助第三个变量交换 a,b两个值
查看>>
[深入SystemUI]-了解recents的启动流程(一)
查看>>
Android线程池的原理以及项目中实践
查看>>
声明 NSString 类型的属性,到底用 strong 还是 copy ?
查看>>
我的友情链接
查看>>
设置接口跨域调用方法
查看>>
python selenium系列(八)元素定位进阶之分层定位
查看>>
MySQL多表连接优化一例
查看>>
PHP动态扩展模块安装
查看>>
AgileEAS.NET平台开发实例-药店系统-UI层重构技巧及其他
查看>>
Go编程基础 - 类型与变量
查看>>
外链优化的发展
查看>>
用Java实现生产者和消费者的多线程例子
查看>>
alter database datafile offline drop 与 alter tablespace drop datafile 区别 .
查看>>
Java学习课程体系
查看>>
我的友情链接
查看>>
Python install 问题汇总
查看>>
我的友情链接
查看>>
JavaScript中的一些特殊用法(六)
查看>>