CSS Transform

by Chris LaFrombois

HTML

<div id="col1">
    <div id="wrap">
        <div id="overlay"><p>content</p></div>
        <img src="http://placehold.it/200x200" />
    </div>
</div>
<div id="col2"></div>
<div id="col3"></div>

CSS

#col1 {
    float: left;
    height: 500px;
    text-align: center;
    width: 33%;
    border-width: 1px;
    border-style: dotted;
}
#col1 div#wrap {
    width:200px;
    height:200px;
    margin:0 auto;
    position:relative;
    top:50%;
    transform:translate(0, -50%) scale(1);
    transition:all .5s ease-out;
    overflow:hidden;
}
#col1 div#wrap:hover {
    cursor:pointer;
    transform:scale(1.1) translate(0, -50%) rotate(.75turn);
}
#overlay {
    width:150px;
    height:50px;
    opacity:0;
    position:absolute;
    box-shadow:10px 10px 20px 20px rgba(255,255,255,0);
    transition:all .5s ease-in;
    top:50%;
    left:0;
    right:0;
    margin:0 auto;
    transform:scale(2) translate(0,-20%);
    text-shadow:0 0 3px #000;
    background:rgba(255,255,255,0.5);
}

#wrap:hover #overlay {
    top:50%;
    opacity:1;
    transition:all .5s;
    transform:scale(1) translate(0,-50%) rotate(-.75turn);
     box-shadow:0 0 0 1px rgba(255,255,255,1), 0 0 0 10px rgba(34,234,210,0.6), 0 0 0 5px #ff0;
    text-shadow:0 0 0 #000;
}

#col2 {
    float:left;
    height: 500px;
    text-align: center;
    width: 33%;
    border-width: 1px;
    border-style: dotted;
}
#col3 {
    float: left;
    height: 500px;
    text-align: center;
    width: 33%;
    border-width: 1px;
    border-style: dotted;
}
#navtable {
    border-width: 1px;
}
#navbar {
    min-width: 600px;
}
ul {
    text-align: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
}
li {
    display: inline;
}
a:link {
    color: black;
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: black;
}
a:hover {
    text-decoration: none;
    color: black;
}
a:active {
    text-decoration: none;
    color: grey;
}