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

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

1. HTML文本 · LayaAir3.0文档 · LAYABOX [ 100%]

...2.4 InnerHTML属性三、代码中使用3.1 同一个文本中设置BoldFontFontSize、Color、下划线3.2 同一个文本中设置字体、颜色不同3.3 获取html文本的实际宽高(contextWidth、contextHeight)3.4 设置文本的水平居中对齐(align需要和width配合使用)3....

来源: Laya3.0_文档 发布时间: 20230303

2. 自己写了个label继承官方的label,出现了问题,求指导~ [ 97%]

...bel:laya.ui.Label = new laya.ui.Label(); // label.text = "Hello"; // label.fontSize = 50; // label.color = "#FF00FF"; // label.wordWrap = true; // label.width = 100; // label.height = 100; // label.x = 100; // label.y = 100; // Laya.stage.addChild(label); } } }自己写的label类:package { import...

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

3. HTMLDivElement 对齐问题! [ 95%]

...博 QZONE 微信 熊猫大侠 赞同来自: <span style="color:#AA7850;font-weight:bold;font:24px SimHei">对单个目标造成</span> <span style="color:#FF0000;font-weight:bold;font:24px SimHei">350%</span> <span style="color:#AA7850;font-weight:bold;font:24px SimHei"&gt...

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

4. 富文本排版问题 [ 95%]

....HTMLDivElement(); let htmlStr:string = "";   htmlStr += "<span style='font-weight:bold;font:24px Arial' color='#fafbf9'>累计进行关卡</span>"; htmlStr += "<span style='font-weight:bold;font:48px Arial;valign:top' color='#84ED4A'>3</span>"; htmlStr += "<span style='f...

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

5. 分享,扩展Laya.Text组件实现简单的富文本 [ 95%]

...bleLineCount) { var graphics = this.graphics; graphics.clear(true); var ctxFont = (this.italic ? "italic " : "") + (this.bold ? "bold " : "") + this.fontSize + "px " + (Browser.onIPhone ? (laya.display.Text._fontFamilyMap[this.font] || this.font) : this.font); Browser.context.font = ctxFont; var pad...

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

6. laya.utils.FontInfo [ 94%]

...I DocumentationAll Packages | All Classes | Index | Frames No Frames FontInfoProperties | Methods Packagelaya.utilsClasspublic class FontInfoInheritanceFontInfo ObjectPublic Properties PropertyDefined By  _bold : Boolean = falseFontInfo  EMPTY : FontInfo[static] FontInfo  _family : St...

来源: Laya2.0_api 发布时间: 20190513

7. laya.display.css.TextStyle_API3.0 [ 93%]

...archy TextStyle Index Constructors constructor Properties align bold color font fontSize italic leading strikethrough stroke strokeColor underline underlineColor valign Constructors constructor new TextStyle(): TextStyle Defined in laya/display/css/TextStyle.ts:53 Returns TextStyle Properties align ...

来源: Laya3.0_api 发布时间: 20231115

8. HTMLDivElement 2.0 只有单行内容是 水平排版不居中 [ 93%]

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

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

9. 3D文本内容是否可以清除 重新书写 [ 91%]

... cav.height = 256; cxt.fillStyle = 'rgb(' + '255' + ',' + '0' + ',0)'; cxt.font = "bold 50px 宋体"; cxt.textAlign = "center";//文本的对齐方式 cxt.textBaseline = "center";//文本相对于起点的位置 //设置文字,位置 cxt.fillText("-10000", 100, 50, 200);//有填充cxt.font="bold 60p...

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

10. List滚动条问题 [ 91%]

...this._goldLabel = new Laya.Label(); this._goldLabel.color = "#FFBA00"; var font = GameUI.GetFont("$font.marketdlg.default"); this._goldLabel.font = font.family; this._goldLabel.bold = (parseInt(font.bold | 0) == 0 ? false : true); this._goldLabel.fontSize = parseInt(font.size); this._goldLabel.under...

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