好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

css段落首字母下沉_html/css_WEB-ITnose

摘要:

  段落首字母放大是指放大段落开头的字母或者汉字,主要使用了css的first-letter伪类选择器。

单行放大:

  在第一行内放大,效果如下:

             Document              body {            background-color: #FFFFFF;            color: #595959;        }        .contain {            width: 150px;        }        .contain p {            font: 80%/1.6 Verdana, Geneva, Arial, Helvetica, sans-serif;        }        .contain p:first-letter {            font-size: 2em;            padding: 0.1em;            color: #000000;            vertical-align: middle;        }        .contain p:first-line {            color: red;        }        .contain p:first-child:first-letter {            color: red;        }        .contain p:first-child:first-line {            color: inherit;        }           

This is a test article. This is a test article.

This is a test article. This is a test article.

这是一个测试

查看更多关于css段落首字母下沉_html/css_WEB-ITnose的详细内容...

  阅读:27次