jquery - 删除属性显示 :none; so the item will be visible

标签 jquery css attributes

元素是:

span    {
    position:absolute;
    float:left;
    height:80px;
    width:150px;
    top:210px;
    left:320px;

    background-color:yellow;

    display:none;                 //No display                  
    border: 3px solid #111;
}

我使用此代码移除显示,使其可见,

$("span").removeAttr("display");

但它不起作用。我使用的方法是否有效,或者是否有其他方法可以获取结果?

最佳答案

对于这个特定目的,$("span").show() 应该足够好。

关于jquery - 删除属性显示 :none; so the item will be visible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3654068/

相关文章:

jquery - 多个 css 样式应用于一个元素,如何强制一种样式优于另一种样式

javascript - 无法使用 $.each() 函数向对象添加属性

html - 火狐麻烦。一个漂浮的容器比 child 还长?

html - 具有可随文本输入调整大小的灵活背景图像的文本区域

attributes - 在OLC模式(openLdap)中添加新的属性类型

javascript - 在桌面上自动播放 YouTube LazyLoad 嵌入视频?

jquery - 悬停时用边框为列表项下划线

css - 具有较低 z-index 的图像继续内容

c# - 模拟属性 - C#

python - 限制 Python 类中属性的可能值