jquery - CSS - 选择器的使用不正确?

标签 jquery css css-selectors

这是我现在使用 jQuery 的代码。 1.fiddle.我想要的是创建相同的场景没有 jQuery。这就是我的结局。 2. fiddle.
谁能指出我在这里做错了什么? (据我所知,我的问题在于 CSS 选择器)

谢谢。

最佳答案

HTML 中没有 .hide() 方法。要隐藏元素,请将 display 样式设置为 none

setTimeout(function()
{
    document.getElementById("blocker").style.display = "none";
}, 3000);

此外,原始 CSS 可以在没有 jQuery 的情况下工作。

关于jquery - CSS - 选择器的使用不正确?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8687429/

相关文章:

证明框的 CSS 三 Angular 形

css - 开发者控制台的 CSS 选择器返回错误结果

javascript - 如何将 id 传递给 jquery 中的函数?

jquery - 选择以 jquery 开头的类

jquery - 在 jQuery Mobile 中调整分组按钮的位置有问题吗?

javascript - jQuery,隐藏段落

html - 将鼠标悬停在文本上时如何防止文本更改?

html - 如何垂直放置 <td> 颜色?

css - 为 CSS 选择器创建 Sublime Text 3 片段

css - 我在这里需要什么 CSS 选择器?