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

美食类网站模板网站的ftp地址是什么

美食类网站模板,网站的ftp地址是什么,网页视频下载网址,网站前台页面的设计与实现目录 一、Text组件 1、Text组件案例 二、Text组件参数 1、string字符串类型 2、Resources类型 2.1、resources中内容配置 base/element/string.json 中的内容 zh_US/element/string.json 中的内容 es_US/element/string.json 中的内容 2.2、环境适配 适配英文 适配中文…目录 一、Text组件 1、Text组件案例 二、Text组件参数 1、string字符串类型 2、Resources类型 2.1、resources中内容配置 base/element/string.json 中的内容 zh_US/element/string.json 中的内容 es_US/element/string.json 中的内容 2.2、环境适配 适配英文 适配中文 三、Text常用属性 1、fontSize() 2、fontWeight() 3、fontColor() 一、Text组件 鸿蒙中的文本组件是Text Text组件的参数类型为string | Resource string字符串类型如 Text(这是一段文本我是字符串类型)Resource类型使用$r()引用定义的字符串内容在resources/*/element的string.json文件 1、Text组件案例 Entry Component struct Index {State isOn: boolean false;State isDel: boolean false;build() {Column({ space: 10 }) {Text(你好 鸿蒙).fontSize(50)Text($r(app.string.greeting)).fontSize(50)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} } 二、Text组件参数 1、string字符串类型 Text(你好 鸿蒙).fontSize(50) 2、Resources类型 Text组件中的参数的文字内容可是字符串直接写死在代码中也可是编辑到resources目录下下的不用环境的配置文件中如base、en_Us、zh_Us目录下的element中的 String.json文件。 如下图所示Text组件中的$r(app.string.greeting)文本可以写到 三个不同目录的环境中根据不同的环境适配不同的内容。但注意在配置时候必须三个文件中都配置否则会显示报错如 2.1、resources中内容配置 base/element/string.json 中的内容 {string: [{name: module_desc,value: module description},{name: EntryAbility_desc,value: description},{name: EntryAbility_label,value: label},{name: greeting,value: 你好 鸿蒙 base}] } zh_US/element/string.json 中的内容 {string: [{name: module_desc,value: 模块描述},{name: EntryAbility_desc,value: description},{name: EntryAbility_label,value: label},{name: greeting,value: 你好 鸿蒙 zh}] } es_US/element/string.json 中的内容 {string: [{name: module_desc,value: module description},{name: EntryAbility_desc,value: description},{name: EntryAbility_label,value: label},{name: greeting,value: hello harmony en}] } 2.2、环境适配 适配英文 当我们选择en_us时候会自动的选择适配环境 en_US/element/string.json中的适配内容。 适配中文 我们选择zh_us时候会自动的选择适配环境 zh_US/element/string.json中的适配内容。 三、Text常用属性 字体大小fontSize()  方法进行设置该方法参数类型为 string | number | Resource字体粗细fontWeight()方法进行设置该方法参数类型为 string | number | FontWeight字体颜色fontColor() 方法进行设置该方法参数类型为 string | number | Resource   |Color文本对齐               TextAlign.Start       首部对齐                TextAlign.Center    居中对齐                TextAlign.End         尾部对齐  1、fontSize() string       指定字体大小的具体单位例如fontSize(100px)、例如fontSize(100fp)number    数值默认单位 fp Resource 引用resources下的element目录中定义的数值 Entry Component struct Index {State isOn: boolean false;State isDel: boolean false;build() {Column({ space: 10 }) {Text(你好 鸿蒙).fontSize(150px)Text(你好 鸿蒙).fontSize(50fx)Text(你好 鸿蒙).fontSize(50)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} }2、fontWeight() string       数字与样式字符串例如例如100和boldnumber    [100,900]取值间隔为100默认为400值越大字体越粗。FontWeight枚举类型 Entry Component struct Index {State isOn: boolean false;State isDel: boolean false;build() {Column({ space: 10 }) {Text(你好 鸿蒙).fontSize(50)Text(你好 鸿蒙).fontSize(50).fontWeight(600)Text(你好 鸿蒙).fontSize(50).fontWeight(500)Text(你好 鸿蒙).fontSize(50).fontWeight(FontWeight.Bold)Text(你好 鸿蒙).fontSize(50).fontWeight(bolder)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} }3、fontColor() string       rgb(0, 128, 0)或者#008000number    16进制的数字如 0x008000Resource 引用resources下的element目录中定义的数值Color        枚举类型例如Color.Green Entry Component struct Index {State isOn: boolean false;State isDel: boolean false;build() {Column({ space: 10 }) {Text(你好 鸿蒙).fontSize(50).fontColor(Color.Green)Text(你好 鸿蒙).fontSize(50).fontWeight(600).fontColor(Color.Orange)Text(你好 鸿蒙).fontSize(50).fontWeight(500).fontColor(Color.Blue)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} }Entry Component struct FontColorPage {build() {Column({ space: 50 }) {Text(Color.Green).fontSize(40).fontWeight(FontWeight.Bold).fontColor(Color.Green)Text(rgb(0, 128, 0)).fontSize(40).fontWeight(FontWeight.Bold).fontColor(rgba(59, 171, 59, 0.33)) // rgba 表示透明度Text(#008000).fontSize(40).fontWeight(FontWeight.Bold).fontColor(#a4008000)Text(0x008000).fontSize(40).fontWeight(FontWeight.Bold).fontColor(0xa4008000)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} } 4、文本对齐 Entry Component struct Index {State isOn: boolean false;State isDel: boolean false;build() {Column({ space: 10 }) {Text(文本对齐TextAlign.Start首部对齐、TextAlign.Center 居中对齐、TextAlign.End尾部对齐).fontSize(20).textAlign(TextAlign.Start)Text(文本对齐TextAlign.Start首部对齐、TextAlign.Center 居中对齐、TextAlign.End尾部对齐).fontSize(20).textAlign(TextAlign.End)Text(文本对齐TextAlign.Start首部对齐、TextAlign.Center 居中对齐、TextAlign.End尾部对齐).fontSize(20).textAlign(TextAlign.Center)}.width(100%).height(100%).justifyContent(FlexAlign.Center)} }
http://www.zqtcl.cn/news/950628/

相关文章:

  • 企业网站建设范文wordpress 5.1
  • 网站 河北 备案 慢设计一个营销方案
  • 网站建设培训合肥品牌设计案例
  • 建网站注册免费云服务器
  • 可以做网站的公司有哪些聊天软件开发厂家有哪些
  • 正规网站建设公司一般要多少钱婚纱网站有哪些
  • 企业网站开发目的和意义住房和城乡建设厅官网查询
  • 直播一级a做爰片免费网站wordpress 模板 使用
  • 网站开发中期检查优质的菏泽网站建设
  • 建设网站号码在线html编辑
  • 品牌型网站制作有哪些公司石家庄广告制作公司
  • 做网站赚几百万网站效果图怎么做的
  • 哪些网站做企业招聘不要花钱wordpress底部导航代码
  • 怎么用链接进自己做的网站企业组织架构
  • 建设新网站征求意见网站设计佛山
  • 重庆建设造价工程信息网站东莞电商页面设计公司
  • 乔拓云智能建站官网登录入口怎么样做网站卖农产品
  • 怎么维护好网站网站的域名每年都要续费
  • 运动网站模板佛山三水区有没有网站建设公司
  • 申请微官网的网站国外域名注册商网站
  • 集团公司网站建设建设中学校园网站的来源
  • 产品展示网站含后台网站模板下载网站开发什么语言好
  • 做知乎网站的图片如何设计好网站
  • 广州企业网站推广织梦学校网站模板
  • 国内响应式网站案例深圳住房和城乡建设局网站
  • 网页制作网站首页中国建筑论坛网
  • 众创空间网站建设少年宫网站建设模块
  • 企业营销型网站的内容科技公司取名大全
  • 哈尔滨云建站模板投资公司的钱从哪里来
  • 海南做网站公司哪家好中国人做外贸生意的网站