实现标题和文本区域最常用的是基础组件 text。text 组件用于展示文本,可以设置不同的属性和样式,文本内容需要写在标签内容区,完整属性和样式信息请参考text。在页面中插入标题和文本区域的示例如下:
<!-- xxx.hml -->
<div class="container">
<div class="left-container">
<text class="title-text">{{headTitle}}</text>
<text class="paragraph-text">{{paragraphFirst}}</text>
<text class="paragraph-text">{{paragraphSecond}}</text>
</div>
</div>
.container {
margin-top: 24px;
background-color: #ffffff;
}
.left-container {
flex-direction: column;
margin-left: 48px;
width: 460px;
}
.title-text {
color: #1a1a1a;
font-size: 36px;
height: 90px;
width: 400px;
}
.paragraph-text {
color: #000000;
margin-top: 12px;
font-size: 20px;
line-height: 30px;
}
// xxx.js
export default {
data: {
headTitle: "Capture the Beauty in This Moment",
paragraphFirst: "Capture the beauty of light during the transition and fusion of ice and water. At the instant of movement and stillness, softness and rigidity, force and beauty, condensing moving moments.",
paragraphSecond: "Reflecting the purity of nature, the innovative design upgrades your visual entertainment and ergonomic comfort. Effortlessly capture what you see and let it speak for what you feel.",
},
}
场景介绍图像属性解码就是获取图像中包含的属性信息,比如EXIF属性。接口说明图像属性解码的功能主要由 ImageSource 和 ExifUtil...
场景介绍WLAN P2P 功能用于设备与设备之间的点对点数据传输,应用可以通过接口完成以下功能:发现对端设备。建立与移除群组。向...
FlexLayoutjava.lang.Object |---ohos.agp.components.Component |---|---ohos.agp.components.ComponentContainer |---|---|---...
ListComponent.ListLayoutConfigjava.lang.Object |---ohos.agp.components.ComponentContainer.LayoutConfig |---|---ohos.agp....