【发布时间】:2018-09-25 21:39:11
【问题描述】:
我想要完成的图像:
这是我正在使用的 HTML 片段:
<section class="card button ">
<span class="arrow">More Work</span>
</section>
这是我的 CSS。我在网上看了一些东西,并尝试在 jsbin 上使用它,但我需要一个看起来更像按钮的东西。
.button span{
background-color: gold;
width: 40%;
height: 30%;
}
.button span::after{
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 0;
border-left: 20px solid black;
border-top: 20px solid black;
border-bottom: 20px solid black;
}
.button span::before{
content: "";
position: absolute;
right: -20px;
bottom: 0;
width: 0;
height: 0;
border-left: 20px solid black;
border-top: 20px solid black;
border-bottom: 20px solid black;
}
【问题讨论】:
标签: css pseudo-element