3

I'm trying to do a ul with each li having glyphicon-ok instead of the normal bullets.

Code I'm using is:

    %li.glyphicon.glyphicon-ok ok sign?

Which is outputting the icon but the text is showing in (I'm guessing) times new roman. When I inspect the css it says the font is still 'Glyphicon'.

I've read HAML isn't ideal to use for formatting content, and I'm guessing this is why.

Any ideas as to what I need to use to get the text to respect my custom font but still retain the ability to use glyphicons?

Many thanks

4

1 回答 1

2

为什么要在 li 中以 glyphicon-ok 图像为背景写文本?如果你需要一个链接或任何东西将它嵌套在 glyphicon li 中

%li.glyphicon.glyphicon-ok
  %span your text

然后定位内部跨度以使用您的自定义 css

或者您可以在跨度内使用 li 做其他方式

%span.glyphicon.glyphicon-ok
  %li your text
于 2013-09-26T06:02:46.137 回答