有一些眼睛糖果实验CSS,如边界半径(圆角)和梯度,我希望使用在我的网页。不幸的是,Internet还不支持这些。至少边界半径正在IE9上出现,还没有关于渐变的词.
所以,你会建议不要让IE单独使用(我的大多数用户无论如何都会在FF或Chrome上)还是使用图像来“修复”IE的演示文稿?值得吗?因为我知道,这不仅是一个痛苦的背后,但也可能打破样式在其他浏览器。
那么,是黑还是不黑?
发布于 2010-08-13 12:50:40
如果您不想要图片、IE黑客或单独的样式表,您可以始终查看CSS3Pie:http://css3pie.com/。它并不完美,尤其是当你想要一些渐变和阴影,但它可以很容易地处理圆角。有类似的IE行为,但我认为这是目前最积极的发展。
发布于 2010-08-13 06:20:08
虽然这个问题有点主观,但我的答案是不要黑。CSS3是向后兼容的,这意味着如果浏览器不支持它,它就会优雅地退化。对我来说应该是这样。我的意思是,如果你仍然打算破解CSS3,为什么还要使用它呢?在这种情况下,只需使用简单的老式CSS2技巧,比如javascript、圆角或图像,这样您就不必自己黑了。
发布于 2010-08-13 13:14:30
术语小问题:使用图像模仿IE中的CSS3特性并不是真正的黑客行为。任何在CSS中不直接支持的视觉效果都需要在图像中实现。
但要回答你的问题,这取决于:
- If the `border-radius` effects aren’t a key part of the site’s branding, then I’d suggest you just let IE ignore them and use square corners. No-one browses the web with two browsers simultaneously, and no-one cares if your site looks a little bit different in IE 6, as long as the buttons are in the same place and everything works.
- If they are a key part of the site’s branding, or your client insists on the site looking the same in IE 6, then you’ve got to achieve the look in IE 6. So, either: - use `border-radius`, and use [conditional comments](http://www.quirksmode.org/css/condcom.html) to include a stylesheet for IE 8 and below with code to imitate the features
- don’t bother with `border-radius` — use the code that works in IE for all browsers. This will avoid you having to maintain two sets of code, but it will mean that all browsers have to download the images you’re using for IE, thus making them perform slightly less well.
https://stackoverflow.com/questions/3474339
复制相似问题