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 7684293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:59:35+00:00 2026-05-31T18:59:35+00:00

I put together a short script for a fellow classmate and thought I would

  • 0

I put together a short script for a fellow classmate and thought I would show a nice backgound fade to make it look nicer. I can achieve the color change but it will not transition smoothly from one state to the next. I thought this would work but perhaps I am wrong or missed something.

Everything else in the script works so go ahead and use if you wish. All it does is cause a screen halt so a error or message can be displayed before doing anything else.

the template:

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Message Expansion Demonstration</title>

<style>

body {  
        margin:0 auto;
        padding:0 0;
        height:100%;
        width:100%;
        text-align:center; }

#haltPage {
        display:none;
        position:absolute;
        height:100%;
        width:100%;
        top:0px;
        background-color:rgba(0, 0, 0, 0.0);
        transition: background-color 1s linear .1; 
        -webkit-transition: background-color 1s linear .1;
        -o-transition: background-color 1s linear .1;
            z-index=9999;
   }

.wrong {
        position:relative;
        padding:auto auto;
        margin:auto auto;
        height:250px;
        width:400px;
        background-color:#666;
        border-bottom-left-radius:0.5em 0.5em;
        border-bottom-right-radius:0.5em 0.5em;
        border-top-left-radius:0.5em 0.5em;
        border-top-right-radius:0.5em 0.5em;
        box-shadow:5px 10px 25px #000;  }

.wrong p {
        padding:10px;  }

</style>

<script>

function wrong ( classID ) 
{
    var on = 'block';
    var visable = 'rgba(0, 0, 0, 0.4)'; 

    clearClass ( );
    document.getElementById('haltPage').style.display = on;

    document.getElementById('haltPage').style.backgroundColor = visable;
    document.getElementById(classID).style.display = on; 
}

function clearClass ( ) 
{
    var off = 'none';
    document.getElementById('haltPage').style.display = off;
    document.getElementById('wrong1').style.display = off;
    document.getElementById('wrong2').style.display = off;
    document.getElementById('wrong3').style.display = off;
}

</script>

</head>

<body>

    <a href="#" onClick="wrong('wrong1')">Wrong Answer One</a><br><br>
    <a href="#" onClick="wrong('wrong2')">Wrong Answer Two</a><br><br>
    <a href="#" onClick="wrong('wrong3')">Wrong Answer Three</a><br><br>

<!-- This is not seen untill called -->
    <div id="haltPage">
    <br><br><br>
        <div id="wrong1" class="wrong">

            <h1>Wrong!</h1>
            <p>You are wrong!<br><a href="#" onClick="clearClass();">Close</a></p>

        </div>

        <div id="wrong2" class="wrong">

            <h1>Wrong!</h1>
            <p>You are wronger! < Not a word<br><a href="#" onClick="clearClass();">Close</a></p>

        </div>

        <div id="wrong3" class="wrong">

            <h1>Wrong!</h1>
            <p>You are wrongest! < duh<br><a href="#" onClick="clearClass()">Close</a></p>

        </div>     

    </div>

</body>

</html>
  • 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-05-31T18:59:36+00:00Added an answer on May 31, 2026 at 6:59 pm

    Try by adding an “s” behind the values for time in your CSS definition for “#haltPage”:

        transition: background-color 1s linear .1s; 
        -webkit-transition: background-color 1s linear .1s;
        -o-transition: background-color 1s linear .1s;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have put together a script which is very much like the flickr photostream
Put together an extremely simple Knockout.js exmaple to learn how it works. I immediately
I put together a sample scenario of my issue and I hope its enough
I put together a class yesterday to do some useful task. I started alpha
I put together an assembly descriptor <assembly> <id>all</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <moduleSets> <moduleSet>
I put together the following method, which calls my repository to get an image
I put together a bunch of alias commands in a folder. Mainly ssh, so
I put together an image preloader which works fine, but what doesn't work is
As I put together each asp.net page It's clear that most of the time
We're trying to put together kiosk solution where we can charge people by hour

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.