• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 80 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0034 秒)

11. HTMLDivElement 设置字体 [ 89%]

...TMLDivElement();             html.innerHTML = "<span style='font-weight:bold; font:24px SimHei' color='#ff0000'>欢迎你的加入</span>"             +"<span style='font-weight:bold; font:24px Arial' color='#ff0000'>欢迎你的加入</span>";    ...

来源: Laya_社区 发布时间: 20180303

12. Arial Black字体能显示,为啥游戏里在firefox 里字体显示成了Times New Roman了 [ 87%]

...<head> <title></title> <style type="text/css"> .p1{font-family:"Arial bold"; color: #583823;font-size: 25px} .p2{font-family:"Times New Roman";color: #583823;font-size: 25px} .p3{font-family:"Arial Black";color: #583823;font-size: 25px} .p4{font-family:"Arial";color: #583823;...

来源: Laya_社区 发布时间: 20180629

13. android native环境,ttfloader加载的字体,设置无效果! [ 86%]

...  let ttfloader = new Laya.TTFLoader();             ttfloader.load("font/ubuntu-bold.ttf");              ttfloader.fontName = "ubuntu";             ttfloader.err = Laya.Handler.create(this, () => {                 console.log("加载失败ubuntu-bold.ttf");        ...

来源: Laya_社区 发布时间: 20220330

14. UI-TextArea [ 85%]

... function onLoadComplete() { var ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; var scaleFactor = Browser.pixelRatio; Laya.stage.addChild(ta); } })();module laya { import S...

来源: Laya_示例 发布时间: 20251130

15. UI-TextArea [ 85%]

...st TextArea = Laya.TextArea; let ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; Laya.stage.addChild(ta); } } new UI_TextArea();module laya { import Stage = Laya.Stage; impo...

来源: Laya2.0_示例 发布时间: 20251130

16. 对游戏中各种控件字体样式使用“白鹭style”样式表 [ 84%]

...orderColor?: string; /** * 文本颜色 */ color?: string; /** * 字体 */ font?: string; /** * 字体大小 */ fontSize?: number; /** * 是否为斜体 */ italic?: number; /** * 行间距 */ leading?: number; /** * 描边宽度 */ stroke?: number; /** * 描边颜色 */ strokeColor?: string; /** * ...

来源: Laya_社区 发布时间: 20171226

17. laya2.0版本,富文本HTMLDivElement中<p>标签里使用<br />标签时报错,在<span>里也不行 [ 84%]

...letter-spacing:10px;                 字间距      * font-family:宋体;                  字体      * font-size:20px;                      字体大小      * font-weight:bold:none;               字体是否是粗...

来源: Laya_社区 发布时间: 20190815

18. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 83%]

...复 cuixueying 赞同来自: Richer 1.简单的Html属性设置:BoldFontFontSize、Color、下划线 【注意,不支持斜体、描边、span标签内嵌的方式】 示例如下: var div:HTMLDivElement=new HTMLDivElement(); div.innerHTML="&lt;span style='font-weight:bold;" + "font:24px...

来源: Laya_社区 发布时间: 20161027

19. 文本-复杂的文本样式 [ 82%]

...width = 400; //自动换行 txt.wordWrap = true; txt.align = "center"; txt.fontSize = 40; txt.font = "Microsoft YaHei"; txt.color = "#ff0000"; txt.bold = true; txt.leading = 5; //设置描边属性 txt.stroke = 2; txt.strokeColor = "#ffffff"; txt.borderColor = "#00ff00" txt.x = (Laya.stage.width - t...

来源: Laya_示例 发布时间: 20251130

20. 文本-复杂的文本样式 [ 82%]

...width = 400; //自动换行 txt.wordWrap = true; txt.align = "center"; txt.fontSize = 40; txt.font = "Microsoft YaHei"; txt.color = "#ff0000"; txt.bold = true; txt.leading = 5; //设置描边属性 txt.stroke = 2; txt.strokeColor = "#ffffff"; txt.borderColor = "#00ff00"; txt.x = (Laya.stage.width - ...

来源: Laya2.0_示例 发布时间: 20251130