样式中设置background: radial-gradient,真机预览不生效,是官方不支持吗?
发布于 6 年前 作者 nazhang 9521 次浏览 来自 问答
<view class='home-route-left'>单程</view>
.home-route-left {
    &:after {
      content'';
      position: absolute;
      bottom0;
      width0;
      height0;
      height75rpx;
      width40rpx;
      background: radial-gradient(40rpx 80rpx at right top, transparent 100%, aquamarine 50%);
      background: -webkit-radial-gradient(40rpx 80rpx at right top, transparent 100%, aquamarine 50%);
      right: -64rpx;
    }
    &:before {
      content'';
      position: absolute;
      bottom0;
      width0;
      height0;
      height80rpx;
      width40rpx;
      background: radial-gradient(40rpx 80rpx at left bottom, aquamarine 100%, transparent 0);
      background: -webkit-radial-gradient(40rpx 80rpx at left bottom, aquamarine 100%, transparent 0);
      right: -35rpx;
    }
  }

我在调试工具看到样式生效了,但是真机预览就发现样式并没有生效,请问是什么情况呢?有什么解决方案吗?

想要的效果就是图中红框中的弧线。

1 回复

你好,工具表现是什么样的呢?具体是哪个样式出现问题呢?

回到顶部