html - 自定义多边形形状

标签 html css css-shapes

如何在CSS中创建下面的形状?
Polygon Shape
我到处都找过,但没找到运气。

最佳答案

我想和你的照片一样

body{
  background:black;
}
.outer{
  margin:40px auto;
  width:1200px;
  height:100px;
  background:#37FFF7;
}

.inner {
  margin: 0 auto;
	border-bottom: 30px solid white;
	border-left: 70px solid transparent;
	border-right: 70px solid transparent;
	height: 0;
	width: 700px;
  position: relative;
  top:70px;
}

<div class="outer">
  <div class="inner"></div>
</div>

关于html - 自定义多边形形状,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42593271/

相关文章:

css - ionic 可点击元素图标

html - 与曲线的背景,可能吗?

使用 SetTimeout() 的 JavaScript Canvas 动画

html - 如何从 URL 中删除 .html?

Javascript设置innerHTML null问题

jquery - Javascript 错误被标签推到右边

javascript - 粒子不是从 particles.js 生成的

html - 我可以在图像上设置 rotateY() 动画吗?

html - 如何在标题的底部中间添加一个半圆?

css - 使用 CSS 绘制形状