顶部边框阴影设置暂只支持容器组件的shadow属性,可以通过设置最外层组件的底部margin及背景色,如果想要阴影效果,可以考虑使用foregroundBlurStyle实现组件内容模糊,参考链接如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-foreground-blur-style-V5\#foregroundblurstyle参考示例如下:Row() { // 上下左右的内边距分别为0 0 5 0 Row() { Row().size({ width: '100%', height: '100%' }).backgroundColor(Color.Yellow) } .width(100) .height(80) .margin( { top: 0, left: 0, bottom: 5, right: 0 }) .backgroundColor(Color.White) }.backgroundColor(Color.Blue) .foregroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 0.1})
顶部边框阴影设置暂只支持容器组件的shadow属性,可以通过设置最外层组件的底部margin及背景色,如果想要阴影效果,可以考虑使用foregroundBlurStyle实现组件内容模糊,参考链接如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-foreground-blur-style-V5\#foregroundblurstyle
参考示例如下: