我想做类似三角形的旋转木马,但是怎么做?

如何获取此形状轮播的信息

我想做类似三角形的旋转木马,但是怎么做?

我搜索了“三角形旋转木马”、“尖头旋转木马”、“尖锐旋转木马”,但一无所获

deronglpo 回答:我想做类似三角形的旋转木马,但是怎么做?

您可以使用 clip-path 属性来执行此操作

.caroussel {
  background-color: teal;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  clip-path: polygon(0 0,100% 0,100% 70%,50% 100%,0 70%);
}

h1 {
  font-size: 4rem;
  color: white;
}
<div class="caroussel">
  <h1>Hello</h1>
</div>

本文链接:https://www.f2er.com/22984.html

大家都在问