创建五边形形状css:之前使用背景图像

时间:2018-02-27 14:36:43

标签: html css css3

我需要创建一个" div top"五角形的内部背景。 CSS3可以实现吗?我尝试过很多没有成功的事情。这是我目前留下的代码:



.sectionDIVHead:before {
  position: absolute;
  float: left;
  content: " ";
  background-size: 50% 80%;
  background-color: inherit;
  width: 40px;
  height: 40px;
  margin-left: calc(50% - 95px);
  margin-top: -5%;
  background-position: bottom;
  border-left: 52px solid transparent;
  border-right: 54px solid transparent;
  background-image: url("../images/Icon.png");
  background-repeat: no-repeat;
  background: linear-gradient(to top left, #000 50%, transparent 51%)0% 100%/50.5% 70px no-repeat, linear-gradient(to top right, #000 50%, transparent 51%)100% 100%/50% 70px no-repeat;
  padding: 35px;
  padding-bottom: 0;
  text-align: center;
}




0 个答案:

没有答案