likes
comments
collection
share

文本格式与超链接

作者站长头像
站长
· 阅读数 17

这一章是文本格式与超链接,重要内容有ol和li标签创建有序列表,ul和li标签创建无序列表。还有超链接a标签

1.水平线标记符hr


文本格式与超链接

定义一个80px高的水平线:

hr {
        height: 80px;
    }

文本格式与超链接

体会一下:

https://www.runoob.com/tags/t...

2.常用字符样式


文本格式与超链接

文本格式与超链接

文本格式与超链接

3.有序/无序列表


  1. 有序列表和无序列表

    文本格式与超链接

  1. 有序列表和无序列表可以互相嵌套

    文本格式与超链接

  1. 理论提倡写法

    ol {
        list-style-type: upper-roman;
    }

4. URL路径与锚点链接

  1. 使用相对url时 ./ 经常省略 而../表示链接到当前目录的上一级目录中的文件
  2. 锚点链接

    跳转到网站尾部:

    <!-- 放在网站顶部 -->
    <a href="#weibu">
        <strong id="dinbu">跳转到尾部</strong>
    </a>

    跳转到网站顶部:

    <!-- 放在网站底部 -->
    <a href="#dinbu">
        <strong id="weibu">返回顶部</strong>
    </a>

    跨页跳转:

    <!-- 先在要跳转的页面上加一个id属性 -->
    <a href="aaa.html#bbb">
        <h6>外部链接</h6>
    </a>

5.最后记得模块化布局