::selection and ::-moz-selection : moz selection « IE Firefox « HTML / CSS






::selection and ::-moz-selection

 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <style type="text/css">
            ::selection {
                backgroud: crimson;
                color: pink;
            }
            ::-moz-selection {
                background: crimson;   
                color: pink;
            }
        </style>
    </head>
    <body>
        <div>
            <p>
                Some paragraph text.
            </p>
            <p>
                Some more paragraph text.
            </p>
            <p>
                Even more paragraph text.
            </p>            
        </div>
    </body>
</html>

 








Related examples in the same category