【发布时间】:2018-07-22 04:05:18
【问题描述】:
我有一个带有值的 JavaScript 对象。在网页上显示时,我想以不同字体大小的多行显示值。
演示链接:https://plnkr.co/edit/QQsvz4UJPrRHD84t4CkC?p=preview
对象:
$scope.list = [
{id:'January',description: 'Jan summary \n new line text', start:new Date(2017, 11, 3), end:new Date(2017, 11, 3)},
{id:'January',description:'ails \n new line text with small font',start:new Date(2018, 1, 3), end:new Date(2018, 2, 3)},
{id:'February',description: 'feb details1 text here',start: new Date(2017, 11, 17), end:new Date(2017, 11, 17)},
{id:'February',description: 'February details2 text here2', start: new Date(2017, 11, 17), end:new Date(2017, 11, 17)},
{id:'may',description: 'may text first data here', start: new Date(2017, 11, 17), end:new Date(2017, 11, 17)},
];
如何以多行和不同的字体大小显示描述字段中显示的值。我尝试如下所示附加\n,但现在在新行中显示\n 之后的文本.
任何输入...
description:'ails \n new line text with small font'
【问题讨论】:
-
使用 HTML。喜欢,类或
small元素。 -
@TricksfortheWeb - 任何示例代码都会有所帮助..demo plnkr.co/edit/QQsvz4UJPrRHD84t4CkC?p=preview
标签: html css angularjs twitter-bootstrap-3