各位大神有人知道怎么在html中设置垂直分割线使文字位于它的两侧吗

html-css011

各位大神有人知道怎么在html中设置垂直分割线使文字位于它的两侧吗,第1张

html中貌似木有垂直分割线。但可以用div来模拟这个垂直分割线:

<div style='width:49%float:leftheight:700px'>内容区域</div>

<div style='width:1pxborder:1px solid redfloat:leftheight:700px'><!--这个div模拟一条红色的垂直分割线--></div>

<div style='width:50%float:leftheight:700px'>内容区域</div>

Css只有一个hr标签可以生成水平线,如果要插入垂直虚线的话,只需要在左右边框定义宽度和样式即可。

即如下样式(dashed是虚线样式):

border-left:1px dashed blue