Hide/unhide div with button?

后端 未结 4 1062
渐次进展
渐次进展 2021-01-07 08:33
    

Welcome! Chat now!

4条回答
  •  抹茶落季
    2021-01-07 09:30

    There is no way you can do this in html/css

    You can use Jquery

    $('#button').click(function() {
        $('#login').css('visibility', 'visible');
    });
    

    to close

    $('#closelogin').click(function() {
        $('#login').css('visibility', 'hidden');
    });
    

    you just need to change the ID that is #closelogin and the .css('visibility', 'hidden')

    You need to include Jquery library like this in your head or bottom of your page to make it work.

    eg:

    
    

提交回复
热议问题