Nic*_*s-c 6 css firefox webkit google-chrome
我仍然是CSS中的Reflections等新手,所以有一些问题.对于主页我被告知我需要反映文本然后是图像(以及背后的复杂阴影,但这是在我的待办事项列表中).
对于chrome/safari(webkit),我有
-webkit-box-reflect:低于0px -webkit-gradient(线性,左上,左下,从(透明),颜色停止(70%,透明),到(rgba(255,255,255,0.2)));
看起来很不错......但是......显然它只适用于chrome/safari.我将如何在Internet Explorer(如果可能的话,7/8/9)和Firefox中获得相同的效果?
谢谢你,尼古拉斯卡特
也许您可以使用此插件提供 jQuery 后备。
本教程还讨论了跨浏览器反射。
要定位不支持反射的浏览器,您可以使用Modernizr。
此版本:http://modernizr.com/download/#-cssreflections-cssclasses-testprop-testallprops-domprefixesno-cssreflections
将为您的页面标记添加一个类<html>
。
然后,您可以添加特定的 CSS 规则:
.no-cssreflections #element-id {
/* custom CSS rule */
}
Run Code Online (Sandbox Code Playgroud)
或通过 JavaScript:
if(!Modernizr.cssreflections){
/* run plugin or whatever */
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7690 次 |
最近记录: |