CSS3でこの形を再現しようとしています。
これが私の解決策でした:
<span><div id="shape"></div></span>
span {
display: block;
margin-left: 88px;
}
#shape {
width: 160px;
height: 100px;
background: #dcdcdc;
}
#shape:before {
height: 76px;
width: 76px;
top: 20px;
content:"";
position: absolute;
border-radius: 10px;
background-color: #ccc;
left: 60px;
-webkit-transform:rotate(45deg);
}
#shape:after {
height: 76px;
width: 76px;
top: 20px;
content:"";
position: absolute;
border-radius: 10px;
left: 220px;
-webkit-transform:rotate(45deg);
background-color: #ccc;
}
残念ながら、それはスケールしません: CodePen デモ(私が行った方法を説明するために背景色を変更しました)。垂直にスケーリングすることが重要です。
JavaScript ソリューションも機能します。