How to fade in a div on page load?

后端 未结 3 1709
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 07:44

I\'m using jQuery. I need a div to fade in when the page loads.

How can I achieve this?

3条回答
  •  我在风中等你
    2021-02-08 08:29

    See working demo

    $('#monster').hide().fadeIn('slow');
    #monster{
      width: 200px;
      height: 100px;
      border: 1px solid #0095ff;
      border-radius: 5px;
    }
    
    
        This is demo text.
        This is demo text.
        This is demo text.
        This is demo text.
      

提交回复
热议问题