【无标题】

@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column({space:15}) {
     Image($r('app.media.airplane_fill'))
       .width(200)
       .fillColor(Color.Red)
   }
  }
}
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column(){
     Image($r('app.media.startIcon'))
       .width(100)
     Text('大王代码')
       .fontWeight(700)
       .margin({
         top:10,
         bottom:40
       })
     Button('qq')
       .width('100%')
       .margin({
         bottom:10
       })
     Button('weix')
       .width('100%')
       .backgroundColor('#ddd')
       .fontColor('#000')
   }
   .width('100%')
    .padding(20)
  }
}
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column(){
      Text('代码哥')
        .fontColor(Color.Red)
        .padding(5)
        .border({
          width:1,
          color:Color.Blue,
          style:BorderStyle.Dashed
        })
   }
    .padding(20)
  }
}
Text('但便可')
  .padding(5)
  .border({
    width:{left:1,right:2},
    color:{left:Color.Blue,right:Color.Orange},
    style:{left:BorderStyle.Dashed,
            right:BorderStyle.Dotted}
  }
  )
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column(){
     Text('但便可')
       .padding(10)
       .backgroundColor(Color.Green)
       .borderRadius({
         topLeft:10,
       })

   }
    .padding(20)
  }
}

像素点:px实际物理像素。vp虚拟像素

@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column(){
     Text()
       .width(300)
       .height(150)
       .backgroundColor(Color.Green)
       .backgroundImage($r('app.media.startIcon'))
       .backgroundImageSize(ImageSize.Contain)
  }
}
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Column() {
     Text()
       .width(200)
       .height(100)
       .backgroundColor(Color.Pink)
     Text()
       .width(200)
       .height(100)
       .backgroundColor(Color.Pink)
       .margin(5)
     Text()
       .width(200)
       .height(100)
       .backgroundColor(Color.Pink)
   }
   .width('100%')
   .height('100%')
    .justifyContent(FlexAlign.Center)
  }
}
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
   Row() {
     Text()
       .width(60)
       .height(100)
       .backgroundColor(Color.Pink)
     Text()
       .width(60)
       .height(100)
       .backgroundColor(Color.Pink)
       .margin(5)
     Text()
       .width(60)
       .height(100)
       .backgroundColor(Color.Pink)
   }
   .width('100%')
   .height('100%')
    .justifyContent(FlexAlign.End)
  }
}
.alignItems(HorizontalAlign.Start)
@Entry
@Component
struct Index {
  @State message: string = '啥地方';
  build() {
    Column() {
      Row(){
        Column(){
          Text('三一扫')
            .fontSize(30)
          Text('要哟|幺幺出大将来来吗')
        }
        .alignItems(HorizontalAlign.Start)
        Row(){
          Image($r('app.media.foreground'))
            .width(70)
            .backgroundColor(Color.Brown)
        }
      }
      .justifyContent(FlexAlign.SpaceBetween)
      .padding({left:15,right:15})
      .width('100%')
      .height(80)
      .backgroundColor(Color.Gray)
      .borderRadius(5)
    }
    .padding(5)
    .width('100%')
    .height('100%')
    //.justifyContent(FlexAlign.Center)
  }
}

flex

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

C—328G

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值