当前位置: 首页 > news >正文

一般网站是用什么框架做的做互联网推广的公司

一般网站是用什么框架做的,做互联网推广的公司,珠海品牌网站建设,怎样做网站发布信息官方文档:布局概述 常见页面结构图 布局元素的组成 线性布局(Row、Column) 了解思路即可,更多样例去看官方文档 Entry Component struct PracExample {build() {Column() {Column({ space: 20 }) {Text(space: 20).fontSize(15)…

官方文档:布局概述

常见页面结构图

在这里插入图片描述

布局元素的组成

在这里插入图片描述

线性布局(Row、Column)

了解思路即可,更多样例去看官方文档

@Entry
@Component
struct PracExample {build() {Column() {Column({ space: 20 }) {Text('space: 20').fontSize(15).fontColor(Color.Gray).width('90%')Row().width('90%').height(50).backgroundColor(0xF5DEB3)Row().width('90%').height(50).backgroundColor(0xD2B48C)Row().width('90%').height(50).backgroundColor(0xF5DEB3)}.width('100%')Divider().height(20)Row({ space: 35 }) {Text('space: 35').fontSize(15).fontColor(Color.Gray)Row().width('10%').height(150).backgroundColor(0xF5DEB3)Row().width('10%').height(150).backgroundColor(0xD2B48C)Row().width('10%').height(150).backgroundColor(0xF5DEB3)}.width('90%')}}
}

在这里插入图片描述

层叠布局 (Stack)

了解思路即可,更多样例去看官方文档

@Entry
@Component
struct PracExample {build() {Stack({ alignContent: Alignment.TopStart }) {Text('Stack').width('90%').height('100%').backgroundColor(Color.Yellow).align(Alignment.BottomStart)Text('Item 1').width('70%').height('80%').backgroundColor(Color.Green).align(Alignment.BottomStart)Text('Item 2').width('50%').height('60%').backgroundColor(Color.Pink).align(Alignment.BottomStart)}.width('100%').height(150).margin({ top: 5 })}
}

在这里插入图片描述

弹性布局(Flex)

了解思路即可,更多样例去看官方文档
在这里插入图片描述

布局方向

@Entry
@Component
struct PracExample {build() {Column() {Flex({ direction: FlexDirection.Row }) {Text('1').width('33%').height(50).backgroundColor(0xF5DEB3)Text('2').width('33%').height(50).backgroundColor(0xD2B48C)Text('3').width('33%').height(50).backgroundColor(0xF5DEB3)}.height(70).width('100%').padding(10).backgroundColor(Color.Orange)Flex({ direction: FlexDirection.RowReverse }) {Text('1').width('33%').height(50).backgroundColor(0xF5DEB3)Text('2').width('33%').height(50).backgroundColor(0xD2B48C)Text('3').width('33%').height(50).backgroundColor(0xF5DEB3)}.height(70).width('100%').padding(10).backgroundColor(0xAFEEEE)Flex({ direction: FlexDirection.Column }) {Text('1').width('100%').height(50).backgroundColor(0xF5DEB3)Text('2').width('100%').height(50).backgroundColor(0xD2B48C)Text('3').width('100%').height(50).backgroundColor(0xF5DEB3)}.height(70).width('100%').padding(10).backgroundColor(Color.Orange)Flex({ direction: FlexDirection.ColumnReverse }) {Text('1').width('100%').height(50).backgroundColor(0xF5DEB3)Text('2').width('100%').height(50).backgroundColor(0xD2B48C)Text('3').width('100%').height(50).backgroundColor(0xF5DEB3)}.height(70).width('100%').padding(10).backgroundColor(0xAFEEEE)}}
}

在这里插入图片描述

布局换行

@Entry
@Component
struct PracExample {build() {Column() {Flex({ wrap: FlexWrap.NoWrap }) {Text('1').width('50%').height(50).backgroundColor(0xF5DEB3)Text('2').width('50%').height(50).backgroundColor(0xD2B48C)Text('3').width('50%').height(50).backgroundColor(0xF5DEB3)}.width('100%').padding(10).backgroundColor(Color.Orange)Flex({ wrap: FlexWrap.Wrap }) {Text('1').width('50%').height(50).backgroundColor(0xF5DEB3)Text('2').width('50%').height(50).backgroundColor(0xD2B48C)Text('3').width('50%').height(50).backgroundColor(0xD2B48C)}.width('100%').padding(10).backgroundColor(0xAFEEEE)Flex({ wrap: FlexWrap.WrapReverse}) {Text('1').width('50%').height(50).backgroundColor(0xF5DEB3)Text('2').width('50%').height(50).backgroundColor(0xD2B48C)Text('3').width('50%').height(50).backgroundColor(0xF5DEB3)}.width('100%').padding(10).backgroundColor(Color.Orange)}}
}

在这里插入图片描述

主轴对齐方式

@Entry
@Component
struct PracExample {build() {Flex({ justifyContent: FlexAlign.Start }) {Text('1').width('20%').height(50).backgroundColor(0xF5DEB3)Text('2').width('20%').height(50).backgroundColor(0xD2B48C)Text('3').width('20%').height(50).backgroundColor(0xF5DEB3)}.width('90%').padding({ 'top': 10, 'bottom': 10 }).backgroundColor(0xAFEEEE)}
}

在这里插入图片描述

未完待续

相对布局 (RelativeContainer)

了解思路即可,更多样例去看官方文档

@Entry
@Component
struct PracExample {build() {Row() {RelativeContainer() {Row().width(100).height(100).backgroundColor(Color.Red).alignRules({top: { anchor: "__container__", align: VerticalAlign.Top },left: { anchor: "__container__", align: HorizontalAlign.Start }}).id("row1")Row().width(100).backgroundColor(Color.Black).alignRules({top: { anchor: "__container__", align: VerticalAlign.Top },right: { anchor: "__container__", align: HorizontalAlign.End },bottom: { anchor: "row1", align: VerticalAlign.Center },}).id("row2")Row().height(100).backgroundColor(Color.Blue).alignRules({top: { anchor: "row1", align: VerticalAlign.Bottom },left: { anchor: "row1", align: HorizontalAlign.Start },right: { anchor: "row2", align: HorizontalAlign.Start }}).id("row3")Row().backgroundColor(Color.Green).alignRules({top: { anchor: "row3", align: VerticalAlign.Bottom },left: { anchor: "row1", align: HorizontalAlign.Center },right: { anchor: "row2", align: HorizontalAlign.End },bottom: { anchor: "__container__", align: VerticalAlign.Bottom }}).id("row4")}.width(300).height(300).margin({ left: 50 }).border({ width: 2, color: Color.Orange })}.height('100%')}
}

在这里插入图片描述

栅格布局 (GridRow/GridCol)

了解思路即可,更多样例去看官方文档

@Entry
@Component
struct PracExample {@State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown];build() {Column() {GridRow({ columns: 10 }) {ForEach(this.bgColors, (color: Color, index?: number | undefined) => {GridCol({ span: 2 }) {Row() {Text(`${index}`)}.width('100%').height('50vp')}.backgroundColor(color)})}}}
}

在这里插入图片描述

媒体查询 (@ohos.mediaquery)

需要消化

创建列表 (List)

列表是一种复杂的容器,当列表项达到一定数量,内容超过屏幕大小时,可以自动提供滚动功能

@Entry
@Component
struct PracExample {build() {Column({ space: 5 }) {List() {ListItem() {Row() {Image($r('app.media.icon')).width(40).height(40).margin(10)Text('小明').fontSize(20)}}ListItem() {Row() {Image($r('app.media.ic_main')).width(40).height(40).margin(10)Text('小红').fontSize(20)}}}}.width('100%').height('100%')}
}

在这里插入图片描述

创建网格 (Grid/GridItem)

网格布局具有较强的页面均分能力,子组件占比控制能力,是一种重要自适应布局,其使用场景有九宫格图片展示、日历、计算器等。

@Entry
@Component
struct PracExample {@State services: Array<string> = ['会议', '投票', '签到', '打印']build() {Column() {Grid() {ForEach(this.services, (service:string) => {GridItem() {Text(service)}}, (service:string):string => service)}.rowsTemplate(('1fr 1fr') as string).columnsTemplate(('1fr 1fr') as string)}}
}

在这里插入图片描述

创建轮播 (Swiper)

Swiper本身是一个容器组件,当设置了多个子组件后,可以对这些子组件进行轮播显示。通常,在一些应用首页显示推荐的内容时,需要用到轮播显示的能力。

@Entry
@Component
struct PracExample {private swiperController: SwiperController = new SwiperController();build() {Column({ space: 5 }) {Swiper(this.swiperController) {Text('0').width(250).height(250).backgroundColor(Color.Gray).textAlign(TextAlign.Center).fontSize(30)Text('1').width(250).height(250).backgroundColor(Color.Green).textAlign(TextAlign.Center).fontSize(30)Text('2').width(250).height(250).backgroundColor(Color.Pink).textAlign(TextAlign.Center).fontSize(30)}.indicator(true)Row({ space: 12 }) {Button('showNext').onClick(() => {this.swiperController.showNext(); // 通过controller切换到后一页})Button('showPrevious').onClick(() => {this.swiperController.showPrevious(); // 通过controller切换到前一页})}.margin(5)}.width('100%').margin({ top: 5 })}
}

在这里插入图片描述

选项卡 (Tabs)

当页面信息较多时,为了让用户能够聚焦于当前显示的内容,需要对页面内容进行分类,提高页面空间利用率。

@Entry
@Component
struct PracExample {build() {Column({ space: 5 }) {Tabs() {TabContent() {Text('首页的内容').fontSize(30)}.tabBar('首页')TabContent() {Text('推荐的内容').fontSize(30)}.tabBar('推荐')TabContent() {Text('发现的内容').fontSize(30)}.tabBar('发现')TabContent() {Text('我的内容').fontSize(30)}.tabBar("我的")}}.width('100%').margin({ top: 5 })}
}

在这里插入图片描述


文章转载自:
http://superbomber.rzgp.cn
http://freckly.rzgp.cn
http://tetrandrious.rzgp.cn
http://exocentric.rzgp.cn
http://baleen.rzgp.cn
http://iconolater.rzgp.cn
http://cruiseway.rzgp.cn
http://menes.rzgp.cn
http://undergone.rzgp.cn
http://expiratory.rzgp.cn
http://cubiform.rzgp.cn
http://panda.rzgp.cn
http://stannite.rzgp.cn
http://orogenesis.rzgp.cn
http://disorderly.rzgp.cn
http://tine.rzgp.cn
http://myocardia.rzgp.cn
http://rotterdam.rzgp.cn
http://efflorescent.rzgp.cn
http://semiformal.rzgp.cn
http://surroundings.rzgp.cn
http://piffle.rzgp.cn
http://headstrong.rzgp.cn
http://prosyllogism.rzgp.cn
http://italophile.rzgp.cn
http://jude.rzgp.cn
http://intertranslatable.rzgp.cn
http://unconstitutional.rzgp.cn
http://empiricism.rzgp.cn
http://chorda.rzgp.cn
http://weanling.rzgp.cn
http://tarriance.rzgp.cn
http://pomaceous.rzgp.cn
http://trencherman.rzgp.cn
http://maytime.rzgp.cn
http://worrywart.rzgp.cn
http://impedimenta.rzgp.cn
http://millidegree.rzgp.cn
http://bode.rzgp.cn
http://coquetry.rzgp.cn
http://futurama.rzgp.cn
http://delawyer.rzgp.cn
http://rejuvenescent.rzgp.cn
http://glottalize.rzgp.cn
http://hexadecane.rzgp.cn
http://laborsaving.rzgp.cn
http://theocentric.rzgp.cn
http://serendipitous.rzgp.cn
http://irq.rzgp.cn
http://film.rzgp.cn
http://truncated.rzgp.cn
http://garibaldino.rzgp.cn
http://laxness.rzgp.cn
http://gelignite.rzgp.cn
http://hectovolt.rzgp.cn
http://wmc.rzgp.cn
http://moderator.rzgp.cn
http://junta.rzgp.cn
http://gwen.rzgp.cn
http://bustle.rzgp.cn
http://den.rzgp.cn
http://isoandrosterone.rzgp.cn
http://elector.rzgp.cn
http://zoophytic.rzgp.cn
http://reproachless.rzgp.cn
http://herry.rzgp.cn
http://esthesiometer.rzgp.cn
http://blahs.rzgp.cn
http://gestapo.rzgp.cn
http://domain.rzgp.cn
http://reinstate.rzgp.cn
http://demagogical.rzgp.cn
http://prc.rzgp.cn
http://utilization.rzgp.cn
http://keratolytic.rzgp.cn
http://syllabarium.rzgp.cn
http://postural.rzgp.cn
http://mitsvah.rzgp.cn
http://gewgawish.rzgp.cn
http://hummel.rzgp.cn
http://neocomian.rzgp.cn
http://comby.rzgp.cn
http://personnel.rzgp.cn
http://garmenture.rzgp.cn
http://anthropolatric.rzgp.cn
http://theocrat.rzgp.cn
http://subtransparent.rzgp.cn
http://strac.rzgp.cn
http://arillus.rzgp.cn
http://comparator.rzgp.cn
http://livelily.rzgp.cn
http://yankeefied.rzgp.cn
http://incantatory.rzgp.cn
http://nuclease.rzgp.cn
http://sphenography.rzgp.cn
http://choliamb.rzgp.cn
http://brawly.rzgp.cn
http://milliard.rzgp.cn
http://edh.rzgp.cn
http://posttranslational.rzgp.cn
http://www.dt0577.cn/news/94651.html

相关文章:

  • 网站集约化建设困难如何网上免费做推广
  • 天津做网站哪个公司好汕头seo计费管理
  • 成都设计网站建设百度竞价开户3000
  • 成都网站制作设计互联网广告推广
  • 常德行业网站惠州seo计费
  • 做慈善黄色网站国际新闻最新消息
  • wordpress页面标题标签百度搜索关键词排名优化
  • 网站建设免费模版网络推广营销方案免费
  • 传播文化有限公司网站建设0元入驻的电商平台
  • 武汉建筑公司网站北京官网seo收费
  • 培训机构停课信息流优化师培训机构
  • 网站做等报定级工作要多久优秀软文范例800字
  • 数字图书馆网站建设零基础怎么做电商
  • 安卓app开发实例教程seo线下培训课程
  • 毕设做网站怎么弄代码设计兰州疫情最新情况
  • 哈尔滨网站建设效果好seo快速排名优化方式
  • 垂直行业门户网站建设方案新开传奇网站发布站
  • wordpress 积分商城seo有哪些优化工具
  • 集团网站建设服务地推app
  • b2c模式的网站有哪些链接购买
  • 网站建设注意事项公司企业网站建设
  • 自助定制网站开发公司nba最新排名东西部
  • 服务器租用多少钱一个月seo去哪里培训
  • 做网站需要用服务器吗互联网推广方式有哪些
  • 网站设计公司深圳seo谷歌外贸推广
  • 金融学类就业方向及就业前景seo技术306
  • 公司网页设计实例教程seo免费工具
  • 秦皇岛做网站公司排名推广咨询服务公司
  • 山西省网站建设备案表石家庄seo顾问
  • 太原网站建设鸣蝉西安网站设计公司