Div渐变填充和:after

时间:2016-10-09 22:02:08

标签: html css gradient

面对渐变的问题:之后。 如何填充此构造渐变? My example in codepen.

<div class="text-uppercase top-winners">top winners</div>
.top-winners {
  text-align: center;
  height: 100px;
  width: 120px;
  color: #141515;
  font-size: 33px;
  padding-top: 20px;
  background-image: linear-gradient(to bottom, #f3f0a0 0%, #efe93e 100%);
  border: none;
}

.top-winners:after {
  content: "";
  margin-left: 8px;
  border-top: 60px solid transparent;
  border-bottom: 60px solid transparent;
  border-left: 60px solid #f1e469;
  position: absolute;
  top: 9px;
}

0 个答案:

没有答案