CSS如何定义一条水平虚线?

html-css010

CSS如何定义一条水平虚线?,第1张

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<style>标签中,输入css代码:div {height:60pxborder-bottom:1px dashed}。

3、浏览器运行index.html页面,此时通过css定义了一个水平的虚线。

水平实线:<hr/>或<div style="height:10pxborder-bottom:1px solid #f11"></div>

虚线:<div style="height:10pxborder-bottom:1px dashed #f11"></div>

主要是用:border