我的 Controller 中有这个样式对象:
p: {
'font-family': 'Lucida Grande\', \'Lucida Sans Unicode\', Helvetica, Arial, Verdana, sans-serif',
'margin': '0'
}
只有“边距”可用(在 Chrome 开发工具中,“边距”位于“元素”部分的“样式”列表中)。有人发现我指定的字体系列有问题吗?
最佳答案
试试这个:
'font-family': '\'Lucida Grande\', \'Lucida Sans Unicode\', Helvetica, Arial, Verdana, sans-serif',
这可能是因为您需要在 Lucida Grande 之前添加一个左撇号 '
,目前那里的撇号不能满足这个目的。
关于css - 为什么我的样式对象的某些属性在 ng-style 中被忽略了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18163592/