javascript判断浏览器支持CSS3属性
2024-08-25 22:53:34
function getsupportedprop(proparray){
var root=document.documentElement; //reference root element of document
for (var i=0; i<proparray.length; i++){ //loop through possible properties
if (proparray[i] in root.style){ //if property exists on element (value will be string, empty string if not set)
return proparray[i]; //return that string
}
}
}
var boxshadowprop=getsupportedprop([ 'OBoxShadow','WebkitTransform','MozTransform']);
最新文章
- canvas初探1
- 漫谈C语言结构体struct、公用体union空间占用
- sqlserver 中row_number,rank,dense_rank,ntile排名函数的用法
- 使用EntityFramework6连接MySql数据库
- 解决getOutputStream() has already been called for this response
- [nowCoder] 完全二叉树结点数
- Codeforces 55D Beautiful Number
- Oracle中的触发器
- Java面向对象程序设计--与C++对比说明:系列1(面向对象基础)
- CSS中的几个概念--------Day39
- MAC下安装MAMP的Mongodb
- 原生js选项卡
- dict的操作和三级菜单
- GitHub 系列之「Git速成」
- 弄清SDI显示工程中的每一个信号,每一个逻辑
- @JsonInclude注解,RestTemplate传输值为null的属性,利用FastJson将属性中有空值null的对象转化成Json字符串
- Matlab练习——素数查找
- ASP.NET webform多次提交表单问题
- Swift循环遍历集合方法
- 在android工程中,res目录下又有anim、drawable、layout、menu、raw、values和xml文件夹,分别用来保存?