Home  >  Article  >  Web Front-end  >  HTML与CSS入门--第五章 使用文本块和列表_html/css_WEB-ITnose

HTML与CSS入门--第五章 使用文本块和列表_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:33:25873browse

知识点:

  1.在页面上对齐文本的方法

  2.三种HTML列表的使用方法

  3.在列表中放置列表的方法

5.1 在页面上对齐文本:

  父元素内子元素文本的居中:在控制父元素的text-align:center

  子元素相对于父元素的居中:在控制子元素的margin:0 auto;

  PS:div指的是division(分组)。

5.2 三种HTML列表:

  

    ...
  1. :有序列表,整列表有缩进,每个列表项前有数字或者字母

      

      ...
    • :无序列表,与有序列表不一样的是列表项前是符号

        

      ...
      ...
      :自定义列表,dt对应每项标题,然后dd对应每项内容

      5.3 将列表放到列表中:

        blockquote的效果(浏览器已定义好的):

      1 blockquote {2     display: block;3     -webkit-margin-before: 1em;4     -webkit-margin-after: 1em;5     -webkit-margin-start: 40px;6     -webkit-margin-end: 40px;7 }

        列表之间是可以无限嵌套的……

       

       

       

       

       

       

       

        

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn