Skip to content

Instantly share code, notes, and snippets.

@RuanAragao
Created March 9, 2015 18:47
Show Gist options
  • Save RuanAragao/28bfb6f6a7f3c81f8463 to your computer and use it in GitHub Desktop.
Save RuanAragao/28bfb6f6a7f3c81f8463 to your computer and use it in GitHub Desktop.
grafico // source http://jsbin.com/sakaru
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>grafico</title>
<style id="jsbin-css">
body {
background-color: #333;
}
.grafico {
border: solid thin silver;
width: 450px;
height: 300px;
padding: 10px;
}
.coluna {
width: 70px;
height: 300px;
margin: 2px 5px;
float: left;
position: relative;
}
.coluna .fill {
width: 100%;
position: absolute;
bottom: 0px;
text-align: center;
background-color: #fdca01;
}
.rotulo {
color: white;
text-align: center;
}
.data-fill {
color: #333;
font-family: arial; /* remover na implementação */
display: block;
padding-top: 6px;
}
.coluna:nth-child(1) .fill {
height: 10%;
}
.coluna:nth-child(2) .fill {
height: 70%;
}
.coluna:nth-child(3) .fill {
height: 40%;
}
</style>
</head>
<body>
<div class="grafico">
<div class="container-colunas">
<div class="coluna">
<div class="fill">
<span class="data-fill">100k</span>
</div>
<p class="rotulo">100</p>
</div>
<div class="coluna">
<div class="fill">
<span class="data-fill">200k</span>
</div>
<p class="rotulo">200</p>
</div>
<div class="coluna">
<div class="fill">
<span class="data-fill">300k</span>
</div>
<p class="rotulo">300</p>
</div>
</div>
</div>
<script id="jsbin-source-css" type="text/css">body {
background-color: #333;
}
.grafico {
border: solid thin silver;
width: 450px;
height: 300px;
padding: 10px;
}
.coluna {
width: 70px;
height: 300px;
margin: 2px 5px;
float: left;
position: relative;
}
.coluna .fill {
width: 100%;
position: absolute;
bottom: 0px;
text-align: center;
background-color: #fdca01;
}
.rotulo {
color: white;
text-align: center;
}
.data-fill {
color: #333;
font-family: arial; /* remover na implementação */
display: block;
padding-top: 6px;
}
.coluna:nth-child(1) .fill {
height: 10%;
}
.coluna:nth-child(2) .fill {
height: 70%;
}
.coluna:nth-child(3) .fill {
height: 40%;
}</script>
</body>
</html>
body {
background-color: #333;
}
.grafico {
border: solid thin silver;
width: 450px;
height: 300px;
padding: 10px;
}
.coluna {
width: 70px;
height: 300px;
margin: 2px 5px;
float: left;
position: relative;
}
.coluna .fill {
width: 100%;
position: absolute;
bottom: 0px;
text-align: center;
background-color: #fdca01;
}
.rotulo {
color: white;
text-align: center;
}
.data-fill {
color: #333;
font-family: arial; /* remover na implementação */
display: block;
padding-top: 6px;
}
.coluna:nth-child(1) .fill {
height: 10%;
}
.coluna:nth-child(2) .fill {
height: 70%;
}
.coluna:nth-child(3) .fill {
height: 40%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment