CSS Klout Flag

I give you a random+K.

by J. Albert Bowden

HTML

<!-- CSS Only Klout Flag by @girlie_mac -->


<div class="k">
    <div id="kValue" class="k-value">77</div>
</div>

CSS

@font-face {
    font-family: 'DINBold';
    src: url('http://klout.com/fonts/din-bold-webfont.eot');
    src: url('http://klout.com/fonts/din-bold-webfont.eot?iefix') format('eot'),
         url('http://klout.com/fonts/din-bold-webfont.woff') format('woff'),
         url('http://klout.com/fonts/din-bold-webfont.ttf') format('truetype'),
         url('http://klout.com/fonts/din-bold-webfont.svg#webfontP8nfTlwg') format('svg');
    font-weight: normal;
    font-style: normal;
}

.k {
    background-color: #e44803;
    width: 200px;
    height: 160px;
    border-radius: 10px;
    position: relative;
}

.k:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-bottom: 28px solid transparent;
    border-right: 58px solid #e44803;
    position: absolute;
    right: 0;
}

.k-value {
    font-family: DINBold, Arial, sans-serif;
    color: #fff;
    font-size: 150px;
    text-align: center;
    line-height: 150px;
}

JavaScript

// Give me some random +K

var k = document.getElementById("kValue"),
    rand = Math.floor(Math.random() * (99 - 0)); 
k.innerHTML = rand;