Make DIV invisible in CSS and JavaScript

后端 未结 6 1277
执笔经年
执笔经年 2021-02-07 00:49

I have managed to make a DIV tag invisible in JavaScript by setting the display to none and the visibility to hidden. It can be achieved with this class also:

.i         


        
6条回答
  •  太阳男子
    2021-02-07 01:15

    This would probably work:

    .invisible {
        position: absolute;
        left: -9999px;
    }
    

    EDIT: I would take a look at the common helpers in the HTML5 Boilerplate code to explore other ways of making things disappear.

提交回复
热议问题