CSS3 Clock

by davehol

HTML

<div class="clock">
    <p data-date="August 18th" data-ampm="pm">11:45</p>
</div>

<div class="clock light">
    <p data-date="August 19th" data-ampm="am">12:15</p>
</div>

CSS

@font-face { font-family: Museo; font-weight: 100; src: url(http://overra.com/osre/fonts/MuseoSan-100.otf); }
body {
    font-family: sans-serif;
}
.clock {
    border-radius: 5px;
    background: #404040;
    border: 1px #404040 solid;
    box-shadow: 0px 0px 20px rgba(0,0,0,.5), inset 0px 0px 2px rgba(255,255,255,.5);
    color: rgba(0,0,0,.7);
    height: 180px;
    padding: 15px;
    margin: 20px auto 60px auto;
    position: relative;
    text-align: justify;
    width: 330px;
}

.light { 
    background: #dfdfdf;
    border: 1px #c0c0c0 solid;
    box-shadow: 0px 0px 20px rgba(0,0,0,.5), inset 0px 0px 5px rgba(255,255,255,1);
}

.clock:before {

    content: '';
    display: block;
    height: 650px;
    width: 650px; 
    background: -webkit-linear-gradient(top, rgba(255,255,255,0) 50%, rgba(255,255,255,.1)); 
    border-radius: 650px;
    position: absolute;
    left: 50%;
    top: -550px;
    margin-left: -325px;
    clip: rect(550px, 505px, 650px, 145px);
    
}

.clock:after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    margin-left: -12px;
    margin-top: -95px;
    border-radius: 10px;
    background: -webkit-radial-gradient(50% 30%, circle, #f0f0f0, #404040);
    box-shadow: 0px 0px 1px #000, inset 0px 0px 5px #fff;
    -webkit-box-reflect: right 334px;
    opacity: .2;
}

.clock p {
    background: #a4a9a3;
    border-radius: 5px;
    box-shadow: inset 0px 0px 25px rgba(0,0,0,0.2);
    font-family: Museo;
    font-weight: 100;
    height: 100%;
    line-height: 180px;
    font-size: 80pt;
    text-align: center;
    text-shadow: 0px 1px rgba(255,255,255,.5);
    
}

.light p {
    background: #404040;
    color: #fff;
    text-shadow: 0px 0px 10px rgba(255,255,255,.5);
}

.clock p:before {
    content: attr(data-date);
    display: block;
    font-size: 9pt;
    position: absolute;
    top: -60px;
    left: 40px;
    text-shadow: 0px 1px rgba(255,255,255,.3);

}

.light p:before {
    color: rgba(255,255,255,.2);
   ...