快應(yīng)用 text組件

2020-08-08 11:57 更新

概述

文本

文本內(nèi)容寫在標簽內(nèi)容區(qū),支持轉(zhuǎn)義字符"\"

子組件

僅支持<a><span>

屬性

支持 通用屬性

樣式

支持 通用樣式

名稱 類型 默認值 必填 描述
lines <number> -1 文本行數(shù),-1 代表不限定行數(shù)
color <color> rgba(0, 0, 0, 0.54) 文本顏色
font-size <number> 30px 文本尺寸
font-style normal | italic normal
font-weight normal | bold | lighter | border | <number> 1050+ normal 當前平臺僅支持normalbold兩種效果,當值為數(shù)字時,低于550為前者,否則為后者。
font-family 1030+ <string> - 文本字體。可設(shè)置一個有先后順序的,由字體名或者字體族名組成的列表,以逗號分隔。列表中第一個已安裝或者通過 font-face 指定的字體,會被選中作為文本的字體。
text-decoration underline | line-through | none none
text-align left | center | right left
text-indent 1040+ <length> | <percentage> | <cm> | <em> - 規(guī)定文本塊首行的縮進
line-height <length> - 文本行高
text-overflow clip | ellipsis clip 在設(shè)置了行數(shù)的情況下生效

示例

  • 單行省略
 {
  lines: 1;
  text-overflow: ellipsis;
}
  • 多行省略,以兩行為例
 {
  lines: 2;
  text-overflow: ellipsis;
}

事件

支持 通用事件

text   示例代碼

查看 示例代碼


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號