How to put & raquo e & laquo no :: before?

4

I need to put a &raquo and a &laquo in the :before attribute of a given element.

How do I do this in CSS?

ul.breadcumb > li:after{
    content: '&raquo'; /** Isso aqui não funciona **/
}
    
asked by anonymous 24.09.2015 / 18:41

2 answers

5

You can do this using: %code%ABBB . For example:

ul.breadcumb > li:after{
    content: "
<ul class="breadcumb">
    <li>item 1</li>
    <li>item 2</li>
    <li>item 3</li>
    <li>item 4</li>
</ul>
BB"; }
ul.breadcumb > li:after{
    content: "
<ul class="breadcumb">
    <li>item 1</li>
    <li>item 2</li>
    <li>item 3</li>
    <li>item 4</li>
</ul>
BB"; }

If you want the arrow to be pointed to left , use: %code%

Source: Unicode Character 'RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK'
Source: Unicode Character 'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK'

    
24.09.2015 / 18:54
5

You can use the hexadecimal code. Codes & xxxx are entities of HTML and not CSS, you should use an alternative code.

ul.breadcumb > li:after{
    content: '
<ul class="breadcumb">
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
</ul>
BB'; /** Isso aqui funciona **/ }
ul.breadcumb > li:after{
    content: '
<ul class="breadcumb">
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
    <li>teste</li>
</ul>
BB'; /** Isso aqui funciona **/ }
    
24.09.2015 / 18:54