Forma Romb cu CSS
Forma de romb cu un tag DIV si proprietati CSS. Forma de romb e creaata folosind bordurile.
Cod:
<style type="text/css">
#rhombus {
position: relative;
top: -60px;
width: 0;
height: 0;
border: 60px solid transparent;
border-bottom: 75px solid #05ed08;
}
/* Zona de jos */
#rhombus:after {
position: absolute;
left: -60px;
top: 75px;
width: 0;
height: 0;
border: 60px solid transparent;
border-top: 75px solid #05ed08;
content: '';
}
/* Continut in romb */
#rhombus div {
position: relative;
margin: 63px auto 0 -41px;
font-weight: bold;
z-index: 888;
}
</style>
<div id="rhombus"><div>www.discant.ro</div></div>
Rezultat: