我需要在下面的圖像中創建此類形狀,其中包含文本。 其中包含文字的css形狀
這是我嘗試:
HTML
<div class="header-bottom">
<div class="blue-rectangle">
<p>sadasdasdasd</p>
</div>
<div class="blue-rectangle">
<p>dsasdasdasda</p>
</div>
</div>
CSS
.header-bottom{
position: absolute;
right:13%;
bottom:5%;
}
.blue-rectangle {
background-color: rgba(3,78,136,0.7);
padding: 10px 20px 10px 200px;
margin-bottom: 20px;
}
.blue-rectangle p{
color:white;
text-transform: uppercase;
font-size:18px;
}
我嘗試添加變換:歪斜,但歪斜兩個右側,左側和文本本身。
[使用CSS抄近路](可能重複的http://計算器。 com/questions/7324722/cut-corners-using-css) –