【发布时间】:2018-06-14 21:44:49
【问题描述】:
我需要的是实现带有两个右箭头的按钮。一个箭头切割按钮左侧的一块,一个箭头延伸按钮右侧(请参见附图)。
我现在成功的只是添加右箭头(见下图)。
以下是我目前拥有的 css。
.arrow-button {
width: 178px;
height: 82px;
position: relative;
object-fit: contain;
margin-right: 20px;
background-color: #be1a20;
}
.arrow-button:before {
content:"";
position: absolute;
left: 100%;
top: 26px;
width: 0;
height: 0;
border-top: 13px solid transparent;
border-left: 13px solid #be1a20;
border-bottom: 13px solid transparent;
}
.arrow-label {
font-family: Montserrat;
font-size: 13px;
font-weight: 500;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #ffffff;
margin: auto;
}
.layer {
font-family: Montserrat;
font-size: 24px;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #ffffff;
margin: auto;
}
<div class="arrow-button">
<div class="row">
<label class="arrow-label">
SENT
</label>
</div>
<div class="row">
<label class="layer">
10
</label>
</div>
</div>
【问题讨论】:
-
我们可以假设背景颜色总是相同的吗?
-
@Roberrrt 是的,总是一样的。
-
在那种情况下,@dfsq 已经回答了我们。
标签: html css css-shapes