HTML/CSS/CSS Attributes and Javascript Style Properties/header.class — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:16, 26 мая 2010

h1::first-letter

 

<!DOCTYPE html PUBLIC "-/pp/W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type="text/css">
            h1::first-letter, p::first-letter {
                text-transform: capitalize; 
            }
            h1 {
                font-weight: normal;
                text-align: center;
                text-decoration: underline;
            }
            p {
                text-indent: 25px;
                text-align: justify;
                letter-spacing: 1px;
                word-spacing: 5px;
            }
            p::first-letter {
                font: 120%;
            }
        </style>
    </head>
    <body>
        <h1>this is the title</h1>
        <p>This is a test. </p>
    </body>
</html>



h1#top::before, h1#top::after: content: "::";

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type="text/css" media="all">
            h1#top::before, h1#top::after {
                content: "::";
            }
        </style>
    </head>
    <body>
            <h1 id="top">This is the header</h1>
            <p>
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
            </p>
    </body>
</html>