提交 1f6f6d1a 编写于 作者: X xiexiyun

aspect ratio

Signed-off-by: Nxiexiyun <xiexiyun@huawei.com>
Change-Id: I80248e3ea37f06782c3872e4c292d09f75ce2aa2
上级 6d3aef2a
......@@ -419,8 +419,8 @@ struct ScaleCapabilitySample {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Column() {
Image($r("app.media.illustrator")).width('100%').height('100%')
.aspectRatio(1) // 固定宽高比
}
.aspectRatio(1) // 固定宽高比
.border({ width: 2, color: "#66F1CCB8"}) // 边框,仅用于展示效果
}
.backgroundColor("#FFFFFF")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册