Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                same SO link <br>
https://stackoverflow.com/questions/5533171/fade-background-image-in-and-out-with-jquery<br>
also will use a local image asset
  <div class="flex wrap">
          <section class="flex1">

 <div id="lorem">
    <div id="bkg">
<!--    changed id from #lorem to class flex wrap -->
    </div>
        Random Text
    </div>
            
          <!-- <div class="flex"> -->
          <!--  main content -->
          <p>There is nothing more fascinating than the story of humanity.<br>
          W.H. Valentine, (1856-1927)</p>
          <p>This site attempts to what facts known are explained.  When the pedigree or story is of interest, this is listed.
            </p>

          <p>Areas covered:</p>
            <!-- <div class=""> -->
            <ul class="list_simple">
                <li>Ancient : Pre Roman & Roman Civilizations: Greek States, Egypt, Carthage, Persian Empire.<br>
                    <a href="https://en.wikipedia.org/wiki/Persian_Empire">Rome</a></li>
                <li>Early Independent Countries of Latin America & Brazil (Brasil).<br>
                    <a href="https://en.wikipedia.org/wiki/South_America">countries in South America</a></li>
                <li>France</li>
                <li><a href="https://en.wikipedia.org/wiki/Poland">Poland</a></li>
            </ul>

  <p>Ancients  We would like classify the regions and periods rather than the traditional listing of Greek & Roman.
            Hopefully this can lead to a better understanding of how to link the  Kingdoms, Empires, City-States, Republics, and Peoples.</p>
<br><br>
         
        </div> <!-- close flex wrap  -->
  </section>
</div>

              
            
!

CSS

              
                /* I do not like this as I do NOT put images in CSS
   also assets apparently don't work with full link on CP ?*/
#lorem{
    width:400px;
    height:150px;

    position:relative;
    top:0px;
    left:0px;
}

#bkg{
    background:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/2190346/Pythagoran_snail_fade55_400x600.png') no-repeat;
    
    position:absolute;
    top:0px;
    left:0px;

    width:400px;
    height:150px;
    z-Index:-1;
}
              
            
!

JS

              
                function bkgFadeOut(){
    $('#bkg').fadeOut();
}

function bkgFadeIn(){
     $('#bkg').fadeIn();
}

setTimeout(function(){bkgFadeOut();}, 2000);
setTimeout(function(){bkgFadeIn();}, 5000);
              
            
!
999px

Console