border-image:IE的解决方法 [英] border-image: workaround for IE

查看:508
本文介绍了border-image:IE的解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有IE的解决方法,这使我能够使用 border-image ?我正在开发一个网站,它在每个浏览器正常工作,但IE。我需要模仿这些栏

Is there any workaround for IE which makes me able to use border-image? I'm developing a site and it's working properly in every browser but IE. I need to mimic these bars

我可以请使用 ie-css3.htc 黑客,但 border-radius 只适用于四个角落(这里不适用,因为顶部边框不是圆角)和过滤器 css属性对于渐变)不能与 border-radius 一起使用(它填充整个元素,忽略边界半径限制)。

I could use the ie-css3.htc hack but border-radius works only with the four corners together (which doesn't apply here, 'cause the top border isn't rounded) and the filter css property (for gradient) doesn't work with border-radius at all (it fills the whole element ignoring the border radius limits). In case there's no workaround for this, how would be the best way for doing this?

推荐答案

如果没有解决方法, .png 文件是不必要的。只需使用CSS3饼图: http://css3pie.com/

The .png files are unnecessary. Just use CSS3 pie: http://css3pie.com/

摆脱完全使用专有的IE过滤器,而改为使用(heh,专有) -pie-background:linear-gradient(values)

Get rid of the proprietary IE filter entirely, and use (heh, the proprietary) -pie-background:linear-gradient(values) instead.

与单独圆角和谐地工作: border-radius:0 5px 5px 5px

Works harmoniously with individually rounded corners: border-radius: 0 5px 5px 5px

然后使用

Then use behavior:url(path_to/pie.htc); in the same style.

还要记住,path_to是相对于正在查看的文档而言的,因为它的行为:url(path_to / pie.htc); ,而不是调用它的CSS文件。

Remember also that the path_to is relative to the document being viewed, not the CSS file that calls it. Make sure to check that if it doesn't work right off the bat.

我已经测试了这么多次,它的作用就像一个魅力。

I've tested this plenty of times and it works like a charm.

其他信息

如果有时您的样式出现并消失, code> position:relative 和指定的 z-index 。 CSS3 PIE的工作方式,它与z-index一起使用,如果未指定,可以使您的样式渐变(和圆角等)出现在背景下方,特别是如果您使用负边距或类似的东西。

If sometimes your styling appears and vanishes, try giving your element a position:relative and a specified z-index. The way CSS3 PIE works, it plays with the z-index and can make your styled gradients (and rounded corners, etc.) appear underneath the background if not specified, particularly if you use negative margins or something odd like that.

这篇关于border-image:IE的解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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