【HarmonyOS】组件下划线与边框
作者:zhongcx
- 2024-10-09 广东
本文字数:396 字
阅读完需:约 1 分钟
在 HarmonyOS 的 ArkUI 框架中,开发者可以通过 Text 组件与 border 相关样式属性来实现各种视觉效果,如虚线边框和下划线。
@Entry@Componentstruct Page51 { build() { Column() { Text('虚线边框测试') .width(200) .height(150) .borderStyle(BorderStyle.Dashed) .borderWidth(1) .backgroundColor('#F5F5F5') Row() { Text('利用底部边框实现添加下划线效果') .height('48lpx') .margin({ top: '66lpx' }) .fontSize('28lpx') .fontColor("#FF1919") .textAlign(TextAlign.Center) .borderWidth({ bottom: 1 }) .borderStyle(BorderStyle.Solid) .borderColor("#FF1919") }.width('100%').justifyContent(FlexAlign.Center)
} .width('100%') .height('100%') }}复制代码
划线
评论
复制
发布于: 刚刚阅读数: 2
zhongcx
关注
还未添加个人签名 2024-09-27 加入
还未添加个人简介









评论