Twitter引导:跨浏览器圆角和渐变? [英] Twitter bootstrap: cross browser rounded corners and gradients?

查看:164
本文介绍了Twitter引导:跨浏览器圆角和渐变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法添加到Twitter的Bootstrap跨浏览器支持圆角和css渐变(阅读:stupid IE 7+支持)?

Is there any way to add to Twitter Bootstrap cross browser support to rounded corners and css gradients (read: stupid IE 7+ support)?

推荐答案

我会使用CSSPIE - http://css3pie.com/

I'd use CSSPIE - http://css3pie.com/

这是一个允许你这样做的.htc文件。

It's a .htc file that will allow you to do this.

在任何使用border-radius的CSS选择器中.htc作为行为:

In any CSS selector where you're using border-radius (for example) you include the .htc as a behavior:

.rounded {
    border: 1px solid #999;
    -webkit-border-radius: 10px;
       -moz-border-radius: 10px;
            border-radius: 10px;
    behavior: url(path/to/PIE.htc);
}

注意:确保您的路径相对于根 NOT CSS文件。它必须这样的方式.htc文件运行的某些原因只有微软知道。

NOTE: Make sure your path is relative to the root NOT the CSS file. It has to be this way for .htc files to run for some reason only Microsoft know.

这篇关于Twitter引导:跨浏览器圆角和渐变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆