使用IE后备实现圆角? [英] Implementing rounded corners with IE fallback?

查看:113
本文介绍了使用IE后备实现圆角?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在IE中实现圆角。我知道使用VML的HTC方法,但这不是一个选项,因为它复杂的事情(例如当你有绝对和相对定位等),它只能应用对所有角落的效果。

I am in a need of implementing rounded corners in IE. I am aware of the HTC approach using VML, but that's not an option because it complicates things (like when you have absolute and relative positioning, etc) and it can only apply the effect on all corners.

我将使用Photoshop制作圆角,然后切片。但是,我不希望整个网络社区遭受IE用户,因此,我想使用 border-radius 支持它。我认为这是足够安全的应用 border-radius 给大家,并把一个IE条件注释 IE lt 9 应用图像对于IE 6,7和8。

I am going to use Photoshop to make the rounded corners, and then slice them. However, I don't want the entire web community to suffer from IE users, thus, I want to use border-radius for those who support it. I think it's safe enough to apply border-radius to everyone and put an IE conditional comment IE lt 9 to apply images for IE 6, 7 and 8.

我的问题是,我如何做这样的ie.css将应用角图像看似无关?绝对定位很容易,但是当角落具有透明度时(即,通过透明角图像可以看到容器的角落),这不是一个选项。任何想法?

My question is that how do I make such a ie.css that will apply corner images seemlessly? It's easy with absolute positioning, but that's not an option when the corners have transparency (i.e., the container's corners will be seen through the transparent corner image). Any ideas?

推荐答案

目前我最喜欢的是 CSS3Pie项目它的简单,非侮辱,意味着你可以做很好的CSS3东西没有一堆独立的黑客在IE的各种版本。

Personally my favourite by far is the CSS3Pie project its simple, non-obstrusive and means that you can do nice CSS3 stuff without a bunch of separate hacks in IE's various versions.

为了说明,这意味着你可以在CSS中使用border-radius,box-shadow等,而不需要做任何条件注释。

Just to clarify, this means you can have border-radius, box-shadow, etc. in your CSS without the need to do ANY conditional comments.

这需要在浏览器上启用JavaScript,但ol'Timmy坐在那里与IE6,没有javascript不是真的期待很多互联网爱是他现在吗?

This does require JavaScript to be enabled on the browser, but ol' Timmy sitting there with IE6 and no javascript isn't really expecting much internet love is he now?

这篇关于使用IE后备实现圆角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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