Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Firefox去掉我的浮动:左_Javascript_Css_Firefox_Css Float - Fatal编程技术网

Javascript Firefox去掉我的浮动:左

Javascript Firefox去掉我的浮动:左,javascript,css,firefox,css-float,Javascript,Css,Firefox,Css Float,在我的Javascript中,有一些代码如下所示: itemView.style.float = 'left'; 在chrome中,float:left显示得很好: style="float: left; cursor: pointer; color: rgb(102, 102, 102); font-size: 12px; line-height: 14px; text-decoration: none; width: 155px; height: 30px; padding-left: 2

在我的Javascript中,有一些代码如下所示:

itemView.style.float = 'left';
在chrome中,float:left显示得很好:

style="float: left; cursor: pointer; color: rgb(102, 102, 102); font-size: 12px; line-height: 14px; text-decoration: none; width: 155px; height: 30px; padding-left: 24px; padding-top: 9px; margin-top: -4px; background-color: white; background-position: initial initial; background-repeat: initial initial";
然而在Firefox中,它是缺失的

style="cursor: pointer; color: rgb(102, 102, 102); font-size: 12px; line-height: 14px; text-decoration: none; width: 155px; height: 30px; padding-left: 24px; padding-top: 9px; margin-top: -4px; background: none repeat scroll 0% 0% white";
应该是:

itemView.style.cssFloat="left"
还有一点。

应该是:

itemView.style.cssFloat="left"

这里还有一点。

您能添加一个完整的代码示例吗?特别有用的是一个JSFIDLE.net示例,它再现了这个问题。让你知道明天你在看“查看源代码”,或者你是从Firefox中的Firebug中提取代码?你确定你的js在Firefox中执行吗?itemView.style.float='left';无法使用CSS浮动元素。看看这个-你能添加一个完整的代码示例吗?特别有用的是一个JSFIDLE.net示例,它再现了这个问题。让你知道明天你在看“查看源代码”,或者你是从Firefox中的Firebug中提取代码?你确定你的js在Firefox中执行吗?itemView.style.float='left';无法使用CSS浮动元素。看看这个-