Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
      <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
    <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
    <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
        <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
    <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
    <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
        <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
        <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
        <section class="box">
        <header class="overlay">
            <h2>Lorem ipsum</h2>
            <p>Harvest Bible Church approached me after seeing the general style of my logo</p>
        </header>
    </section>
</html>
 
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License:none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video{
    margin:0;
    padding:0;
    border:0;
    font-size:100%;
    font:inherit;
    vertical-align:baseline;
    text-decoration:none}
    
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section{display:block}
    
body{
    width:100%;
    font-family:Helvetica, Arial, sans-serif;
    font-size:100%;
    line-height:1.4;
    letter-spacing:0.015em}
    
ol, ul{list-style:none}
    
blockquote, q{quotes:none}
    
blockquote:before, blockquote:after,
q:before, q:after{
    content:'';
    content:none}
    
table{
    border-collapse:collapse;
    border-spacing:0}
    
/*
    OVERLAY PARA GALERIA
*/
.box{
    position:relative;
    float:left;
    width:14em;
    height:14em;
    background-color:#09F}
    
    .overlay{
        position:absolute;
        visibility:hidden;
        width:80%;
        height:80%;
        padding:10%;
        background-color:rgba(255,255,255,.0)}
        
        .overlay h2{
            font-weight:bold;
            font-size:1.3em;
            padding-bottom:0.4em;
            margin-bottom:0.4em;
            border-bottom:0.05em solid rgba(0,0,0,1)}
        
        .overlay p{
            font-family:Arial, Helvetica, sans-serif}
        
    .box:hover > .overlay{
        visibility:visible;
        background-color:rgba(255,255,255,.8);
        -webkit-transition:background 300ms linear;
        -moz-transition:background 300ms linear;
        -o-transition:background 300ms linear;
        transition:background 300ms linear}
 
var coresQueNaoForam = [0,1,2,3,4,5,6,7];
window.onload = function(){
    var box = document.getElementsByClassName('box');
    var background = ["#f36", "#C3C", "#fc0", "#FC6", "#9C0"];
    cor=0;
    div=0;
    setInterval(function(){
            cor = Math.floor(Math.random() * (coresQueNaoForam.length - 1));
            div = Math.floor(Math.random() * (background.length - 1));
            box.item(div).style.backgroundColor = background[coresQueNaoForam.splice(cor,1)];
            if(coresQueNaoForam.length == 0){
              coresQueNaoForam = [0,1,2,3,4,5,6,7];
            }              
        },2000)
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers