多选题 offset属性用于设置组件相对原本的布局位置的偏移量。下列关于offset 的用法正确的是(  )

A、 Text('HelloWorld').offset({x:15,y:'5%'})
B、 Text('HelloWorld').offset(15)
C、 Text('HelloWorld').offset({left:20})
D、 Text('HelloWorld').offset({10,30})
下载APP答题
由4l***5v提供 分享 举报 纠错

相关试题

单选题 下面哪个组件不属于ArkUI中的系统组件(  )

A、Text()
B、Row()
C、Column()
D、Title()

单选题 在自定义组件的Build()函数中,下面哪个组件不可以作为根节点(  )

A、Column
B、Row
C、Text
D、ForEach

单选题 以下哪个代码片段正确地设置了TextArea组件的文本颜色为红色(  )

A、TextArea({placeholder:'请输入..'}).fontColor('FF0000')
B、TextArea({placeholder:'请输入..'}).textColor('#FF0000')
C、TextArea({placeholder:'请输入..'}).textColor('FF0000')
D、TextArea({placeholder:'请输入..'}).fontColor('#FF0000')

单选题 下面哪个组件在使用时必须传入参数(  )

A、Column
B、Image
C、Text
D、Button一个应用可以包含一个或多个HAP包。正确

单选题 小张在开发HarmonyOS应用过程中,希望在组件显示前完成数据初始化的相 关业务,此时他需要在哪个生命周期函数中编写业务逻辑(  )

A、onPageShow
B、aboutToAppear
C、onPageHide
D、onBackPress

单选题 以下哪个属性用于设置Navigation工具栏的显隐(  )

A、hideToolBar
B、hideTitleBar
C、hideMenus
D、hideNavBar

单选题 下列代码中,可以实现Text组件的文本装饰线在文本底部(下划线)的是 .decoration({ typ color:Color.Re .borderWidth(1).padding(10).margin(5) Text('Thisisthetext') .decoration({ typ color:Color.Re .borderWidth(1).padding(10).margin(5) Text('Thisisthetext') .decoration({ typ color:Color.Re .borderWidth(1).padding(10).margin(5) Text('Thisisthetext') .decoration({ typ color:Color.Re .borderWidth(1).padding(10).margin(5)

A、Text('Thisisthetext')
B、TextDecorationTyp
C、None,
D、d
E、TextDecorationTyp
F、LineThrough,
G、d
H、TextDecorationTyp

单选题 首选项preferences值的存储支持哪些数据类型(  )

A、字符型
B、数字型
C、布尔型
D、数字型、字符型、布尔型以及这3种类型的数