You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CSS双叠加层倾斜效果求助:复刻目标样式遇问题

整理后的CSS代码片段

嘿,我把你正在调试的不对称背景样式代码整理成了更易读的Markdown格式,方便你查看和调整:

.asymmetric {
  position: relative;
  background-color: #7CCBF2;
}

.asymmetric::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 115%;
  top: -30px;
  left: 0;
  background-color: red;
  transform: skewY(-3deg);
  z-index: -10;
}

.asymmetric::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 115%;
  top: -10px;
  left: 0;
  background-color: yellow;
  transform: skewY(3deg);
  z-index: -10;
}

body {
  margin: /* 你的代码在这里截断了,可以补充完整的margin值 */
}

要是你后续需要微调倾斜角度、层叠层级或者背景色,直接修改对应的属性值就行~

内容的提问来源于stack exchange,提问作者Zeljko Marinkovic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 02:22:43