HarmonyOS 怎么只切左上和右上两个圆角?

使用 borderRadius 切圆角是切四个角,现在我的需求是切左上和右上两个圆角

阅读 503
1 个回答

参考demo:

@Entry
@Component
struct TextExample6 {
  @State text: string = '你叫什么名字'
  build() {
    Column() {
      Text(this.text)
        .fontSize(16)
        .border({ width: 1 })
        .lineHeight(20)
        .maxLines(1)
        .width(300)
        .margin({ left: 20, top: 20 })
        .borderRadius({
          bottomLeft : 10,
          bottomRight : 10
        })
    }.margin({
      top : 200
    })
  }
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进