HTML标记-创建水平线

水平线提供了HTML中给定部分的结尾,从下一部分到给定部分。HTML提供了

null

标记,这是horizontal的缩写形式,用于创建水平线。


标签

在HTML5之前,


标记可以有如下属性 width , align , size 但是他们的想法随着HTML5而变得绝对。但是所有这些属性函数都随CSS一起提供,我们将在下面对它们进行研究。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<hr> Tag

标签

设置水平线厚度

我们可以用CSS属性设置水平线的大小 border-top . 我们将水平线的大小设置为10像素以下。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Set Horizontal Line Thickness
设置水平线厚度

设置水平线颜色

我们可以设置水平线的颜色。我们将使用 border-top CSS属性,其中我们可以指定不同的方面,如边框大小、类型和颜色。在本例中,我们将边框颜色设置为红色。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Set Horizontal Line Color
设置水平线颜色

设置水平线宽

我们也可以用 width CSS属性。我们可以用像素或页面的百分比来提供宽度。在本例中,我们将水平线宽设置为300px。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Set Horizontal Line Width
设置水平线宽

水平虚线

水平线类型可以在不同的样式中更改。我们可以用下面的虚线画水平线。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Dotted Horizontal Line
水平虚线

大圆形水平线

我们可以把水平线用 border-radius CSS属性。我们将使半径约为5px,如下所示。

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Large Rounded Horizontal Line
大圆形水平线
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享