Javascript <;noscript>;不适用于firefox

Javascript <;noscript>;不适用于firefox,javascript,html,css,Javascript,Html,Css,我有这一点代码的淡入效果,但由于某种原因,firefox没有拿起我需要的,因为淡入它不适用于firefox。我错过了什么才能让它发挥作用 <noscript> </style> <style type="text/css"> body {display:inherit !important;} /*if they haven't got javascript we need to show the body </style> &

我有这一点代码的淡入效果,但由于某种原因,firefox没有拿起我需要的,因为淡入它不适用于firefox。我错过了什么才能让它发挥作用

<noscript>
</style>
<style type="text/css"> 
  body {display:inherit !important;} /*if they haven't got javascript we need to show the body       
</style>
</noscript>

<script type="text/javascript">
 $(document).ready(function() { $("body").fadeIn(1500);});
</script>
除了文档的
部分,您不能在任何地方使用
标记,除了文档的
部分,您不能在任何地方使用
标记(请参阅文章)

另一种方法是将body标记默认为
display:visible
,并使用JavaScript设置
display
属性,如下所示:

<body>
    <script type="text/javascript">document.body.style.display = "none";</script>
    ...
</body>

document.body.style.display=“无”;
...
然后完全去掉您的
标签,并移除
显示:无CSS声明中的行

这样做的好处是,如果浏览器没有启用JavaScript,您的
标记将可见,无论浏览器如何处理
标记。

除了文档的
部分,您不能在任何地方使用
标记,除了文档的
部分外,您不能在任何地方使用
标记(请参阅文章)

另一种方法是将body标记默认为
display:visible
,并使用JavaScript设置
display
属性,如下所示:

<body>
    <script type="text/javascript">document.body.style.display = "none";</script>
    ...
</body>

document.body.style.display=“无”;
...
然后完全去掉您的
标签,并移除
显示:无CSS声明中的行


这样做的好处是,如果浏览器未启用JavaScript,则无论浏览器如何处理
标记,您的
标记都将可见。

您的关闭
位置不正确。您的关闭
位置不正确。很高兴为您提供帮助!如果你不介意接受答案,那就太好了。实际上
中的
标记在HTML5中是有效的,请看这里:我的荣幸,很乐意帮助!如果您不介意接受答案,那就太好了。实际上
中的
标记在HTML5中是有效的,请参见这里: