让IE支持Css3属性(圆角、阴影、渐变)

本文介绍了CSS3Pie的不同实现方式及其优缺点,重点推荐了使用JavaScript的方法,并提供了详细的使用步骤和示例代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

蕃薯耀 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:
    <!--[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]-->
  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 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/

内容概要:本文针对火电厂参与直购交易挤占风电上网空间的问题,提出了一种风火打捆参与大用户直购交易的新模式。通过分析可再生能源配额机制下的双边博弈关系,建立了基于动态非合作博弈理论的博弈模型,以直购电价和直购电量为决策变量,实现双方收益均衡最大化。论文论证了纳什均衡的存在性,并提出了基于纳什谈判法的风-火利益分配方法。算例结果表明,该模式能够增加各方收益、促进风电消纳并提高电网灵活性。文中详细介绍了模型构建、成本计算和博弈均衡的实现过程,并通过Python代码复现了模型,包括参数定义、收益函数、纳什均衡求解、利益分配及可视化分析等功能。 适合人群:电力系统研究人员、能源政策制定者、从事电力市场交易的工程师和分析师。 使用场景及目标:①帮助理解风火打捆参与大用户直购交易的博弈机制;②为电力市场设计提供理论依据和技术支持;③评估不同政策(如可再生能源配额)对电力市场的影响;④通过代码实现和可视化工具辅助教学和研究。 其他说明:该研究不仅提供了理论分析,还通过详细的代码实现和算例验证了模型的有效性,为实际应用提供了参考。此外,论文还探讨了不同场景下的敏感性分析,如证书价格、风电比例等对市场结果的影响,进一步丰富了研究内容。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值