点击查看html编辑器说明文档

CSS绘制梯形edit icon

|
|
Fork(复制)
|
|
作者:
YouYu

👉 新版编辑器已上线,点击进行体验吧!

BUG反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <div class="container">
  <div></div>
  <div></div>
  <div></div>
</div>
        
编辑器加载中
</body>
CSS
格式化
            
            body {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
}

.container {
  position: relative;
  width: 75vw;
  height: 75vh;
  overflow: hidden;
  background-color: #ff9a00;
  border: 1px solid #777;
}

.container div {
  position: absolute;
  width: 75vw;
  height: 75vh;
  transform-origin: bottom left;
}

.container div:nth-of-type(1) {
  background-color: #ff3800;
  /* skew 为倾斜角度 */
  transform: skew(-25deg) translateX(-25vw);
}

.container div:nth-of-type(2) {
  background-color: #7800ff;
  /* skew 为倾斜角度 */
  transform: skew(-25deg) translateX(-45vw);
}

.container div:nth-of-type(3) {
  background-color: #ff009c;
  /* skew 为倾斜角度 */
  transform: skew(-25deg) translateX(-65vw);
}

        
编辑器加载中
JS
格式化
            
            
        
编辑器加载中
预览
控制台