单选题
【单选题】下列代码中,可以实现 Text 组件的文本装饰线在文本底部(下划线)的是
A
Text('This is the text').decoration({type: TextDecorationType.None, color: Color.Red }) .borderWidth(1).padding(10).margin(5)
B
Text('This is the text').decoration({type: TextDecorationType.Underline, color: Color.Red} ).borderWidth(1).padding(10).margin(5)
C
Text('This is the text').decoration({type: TextDecorationType.Overline, color: Color.Red }).borderWidth(1).padding(10).margin(5)
D
Text('This is the text').decoration({type: TextDecorationType.LineThrough, color: Color.Red}).borderWidth(1).padding(10).margin(5)
答案解析
正确答案:B
相关知识点:
Text组件下划线用TextDecorationType.Underline
题目纠错
2025年HarmonyOS应用开发者基础认证题库
相关题目
单选题
【单选题】关于 Web 组件,下面描述错误的是:
单选题
【单选题】 首选项 key 的最大长度限制大小为()字节?
单选题
【单选题】 关于 Resource 是资源引用类型描述错误的是:
单选题
【单选题】 用哪一种装饰器修饰的组件可作为页面入口组件?
单选题
【单选题】 发起网络数据请求需要导入以下哪个模块?
单选题
【单选题】 关于 Tabs 组件页签的位置设置,下面描述错误的是
单选题
【单选题】下列哪一项不属于 ArkUI 组件的公共事件?
单选题
【单选题】 首选项 preferences 值的存储支持哪些数据类型?
单选题
【单选题】 在 stage 模型中,下列配置文件属于 AppScope 文件夹的是?
单选题
3 在 ArkUI 弹性布局中,如何实现子组件的宽高按照预设比例随容器变化而不改变宽高比?( )
