JSFiddle - React, Tailwind, and code Playground
by Alexander Startsev
HTML
<div class="unit">
<div class="unit__content">123</div>
</div>
<div class="unit unit_red">
<div class="unit__content">
123 456
</div>
</div>
<div class="unit unit_gradient">
<div class="unit__content">
<a href="#">Ссылка</a> и текст
</div>
</div>
CSS
body{
margin: 10px;
background: url(http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/concrete_seamless.png) repeat 0 0 #fff;
}
a, a:visited{
color: #fff;
}
a:hover{
text-decoration: none;
}
.unit{
color: #fff;
display: inline-block;
vertical-align: top;
margin: 0;
background-color: green;
font-size: 14px;
font-family: Arial, sans-serif;
padding: 10px 20px;
-webkit-transform: skew(-30deg);
-moz-transform: skew(-30deg);
-ms-transform: skew(-30deg);
-o-transform: skew(-30deg);
transform: skew(-30deg);
}
.unit:first-of-type{
margin-left: 10px;
}
.unit__content{
-webkit-transform: skew(30deg);
-moz-transform: skew(30deg);
-ms-transform: skew(30deg);
-o-transform: skew(30deg);
transform: skew(30deg);
}
.unit_red{
background-color: red;
}
.unit_gradient{
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#31b8f7+0,0082e5+100 */
background: #31b8f7; /* Old browsers */
background: -moz-linear-gradient(top, #31b8f7 0%, #0082e5 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#31b8f7), color-stop(100%,#0082e5)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #31b8f7 0%,#0082e5 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #31b8f7 0%,#0082e5 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #31b8f7 0%,#0082e5 100%); /* IE10+ */
background: linear-gradient(to bottom, #31b8f7 0%,#0082e5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#31b8f7', endColorstr='#0082e5',GradientType=0 ); /* IE6-9 */
}