自动添加& raquo; (»)到li [英] Automatically add » (») to li's

查看:106
本文介绍了自动添加& raquo; (»)到li的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在每个 li 左侧自动添加HTML字符& raquo; (»)



我想要的HTML是:

 < ul> 
< li> item 1< / li>
< li> item 2< / li>
< li> item 3< / li>
< / ul>

并应显示:

 »item 1 
»item 2
»item 3


解决方案

我发现上面的答案对我没有用,但以下是:

 code> li:before {
content:\00BB;
}

这使用十六进制代码代替& raquo。



您可以在此处找到一个很好的十六进制转换器。



希望这有助于某人:)


I want to automatically add the HTML character &raquo; (») to the left of each li element.

What would be the best practise?

I want the HTML to be:

<ul>
  <li>item 1</li>
  <li>item 2</li>
  <li>item 3</li>
</ul>

And it should display:

» item 1
» item 2
» item 3

解决方案

I found the above answer didn't work for me, but the following does:

li:before{
   content: "\00BB";
}

This uses the hexadecimal code for &raquo instead.

A nice hexadecimal converter can be found here.

Hope this helps someone :)

这篇关于自动添加&amp; raquo; (»)到li的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆