remove attribute display:none; so the item will be visible

后端 未结 6 1853
闹比i
闹比i 2020-12-29 01:18

The element is:

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

    background-color:yello         


        
6条回答
  •  猫巷女王i
    2020-12-29 02:05

    If you are planning to hide show some span based on click event which is initially hidden with style="display:none" then .toggle() is best option to go with.

    $("span").toggle();

    Reasons : Each time you don't need to check whether the style is already there or not. .toggle() will take care of that automatically and hide/show span based on current state.

    
    
    

提交回复
热议问题