Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8888631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:05:26+00:00 2026-06-14T22:05:26+00:00

I´m trying to make a full screen black bg with opacity, it appears smoothly

  • 0

I´m trying to make a full screen black bg with opacity, it appears smoothly when the mouse enters to the body and fade out smoothly when the user leaves the body of the page (which is the whole nav content screen).

I´m trying doing it with this script:

    $("body").bind('mouseover', function() {
        $("#bg_black").fadeIn("slow", 0.33);
    });
    $("body").bind('mouseleave', function() {
        $("#bg_black").fadeOut();
    });

with this css:

    #bg_black{
        position: absolute;
        z-index: 1;
        background: black;
        opacity: 0.5;
        width: 100%;
        height: 100%;
        display: none;
    }

But the fadeout doesn´t works and also the fadeIn is very quickly and heavy.

Any ideas to achieve it, to make it also IE compatible? (not using css3)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:05:27+00:00Added an answer on June 14, 2026 at 10:05 pm

    I got this working by adding a div to body.

    <div id="bg"></div>
    

    styled it with css

    #bg {
    
      // so if user scrolls it doesn't matter
      position: fixed; 
      background-color: black;
    
      // expand to height & width
      height: 100%;
      width: 100%;
      margin: 0;
      padding:0;
    
      // hidden initially
      opacity: 0;
    }
    
    body {
      background-color: white;
    }
    

    javascript to fadeIn and fadeOut

    $("#bg").hover(function() {
    
      // should user hover in and out quickly stop animations
      $(this).stop().animate({ opacity: 1 }, 1000);
    
    }, function( ) {
    
      // should user hover in and out quickly stop animations
      $(this).stop().animate({ opacity: 0 }, 1000);
    
    });
    

    Demo here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make videojs full screen on the android devices when the user
Possible Duplicate: C# full screen console? I am trying to make one of my
Simply stated, I am trying to make a game I am working on full-screen.
I am trying to make this VideoView to appear in full screen mode :
I'm trying to make a full screen slideshow kind of effect jsFiddle code here
I have an iframe. I'm trying to make it be full screen width on
I have a WinForms app that I am trying to make full screen (somewhat
I'm trying make a login window where a user is prompted to enter their
I am trying make long screen to vertical direction. So, I need a screen
I am trying to make an arcade machine. The user will purchase credits, which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.