如何在css

时间:2015-07-25 18:28:49

标签: html css

我正在尝试在css中创建一枚奖牌但不幸的是我被困在创建它如何在css / html中创建一枚奖章纯粹我试图通过互联网搜索但是没有找到任何关于此的完美结果 请帮我创建一枚奖牌

enter image description here

2 个答案:

答案 0 :(得分:8)

您可以使用def obtainingparams(self, df, tau_1, tau_2, residuals): print('Calculate the yields Matrix and matrix_of_params in this part') params = np.linalg.lstsq(matrix_of_params,yields) residuals = np.sqrt(((yields - matrix_of_params.dot(params))**2).sum()) tau_1 = tau_1 + 0.2 tau_2 = tau_2 + 0.2 #Checkin how many times the function has been called via a decorator not included in this code while self.obtainingparams(self, df, tau_1, tau_2, residuals).called < 5: self.obtainingparams(self, df, tau_1, tau_2, residuals) 元素

  • 使用歪曲丝带
  • 内圈的盒子阴影

&#13;
&#13;
:pseudo
&#13;
.medal {
  width: 100px;
  height: 120px;
}
.ribbon {
  width: 80px;
  height: 70px;
  margin: 0 auto;
  position: relative;
}
.ribbon:before,
.ribbon:after {
  content: '';
  position: absolute;
  width: 35px;
  height: 100%;
  top: 0;
}
.ribbon:before {
  right: 0;
  background: #30110E;
  transform: skew(-28deg);
}
.ribbon:after {
  background: #EF7E76;
  transform: skew(28deg);
}
.coin {
  border: 1px solid #CA5D3E;
  border-radius: 50%;
  background: #F0CD73;
  width: 70px;
  height: 70px;
  position: relative;
  margin: -15px auto 0 auto;
  box-shadow: 0px 0px 3px 0px #989898;
}
.coin:after {
  content: '';
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  width: 35px;
  height: 35px;
  border-radius: inherit;
  box-shadow: 0 0 0 9px #D9B867;
}
&#13;
&#13;
&#13;

答案 1 :(得分:1)

这可以帮助您开始:codepen上的原始

&#13;
&#13;
.outer {
  margin: 150px auto;
  position: relative;
  width: 75px;
  height: 100px;
  text-align: center;
}
.outer .circle {
  position: absolute;
  top: 0;
  width: 15px;
  background-color: #fbc56f;
  height: 30px;
  border-radius: 0 30px 30px 0px;
  -webkit-transform: rotate(-35deg);
  z-index: 2;
}
.outer .circle:after {
  content: "";
  position: absolute;
  left: -15px;
  top: 0;
  width: 15px;
  background-color: #fab84a;
  height: 30px;
  border-radius: 0 30px 30px 0px;
  -webkit-transform: rotate(180deg);
  z-index: 2;
}
.outer .ribbon {
  width: 15px;
  height: 60px;
  background-color: #9bdbf6;
  position: absolute;
  top: -45px;
  left: -23px;
  z-index: 1;
  -webkit-transform: rotate(-35deg);
  border-right: 1px solid white;
}
.outer .ribbon:after {
  content: "";
  width: 15px;
  height: 60px;
  top: 18px;
  left: 25px;
  background-color: #9bdbf6;
  position: absolute;
  -webkit-transform: rotate(70deg);
}
.outer .ribbon:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 64px;
  width: 1px;
  background-color: white;
  z-index: 3;
}
&#13;
<div class="outer">
  <div class="circle"></div>
  <div class="ribbon"></div>
</div>
&#13;
&#13;
&#13;