html怎么输出一条横线

html-css010

html怎么输出一条横线,第1张

用input页面标签

并将下Border设为直线

<style>

input[type="text"]{border-bottom:solid 1px #ccc}

<style>

<input type="text"/>

输出一条横线用:<hr>如果想让它长点就改变它的样式:<hr style="width:1000PX">变长和粗:<hr style="width:1000PXheight:20px">其中width 是宽(长),height是高(粗细)。

扩展资料:

<head></head>:这2个标记符分别表示头部信息的开始和结尾。头部中包含的标记是页面的标题、序言、说明等内容,它本身不作为内容来显示,但影响网页显示的效果。头部中最常用的标记符是标题标记符和meta标记符,其中标题标记符用于定义网页的标题,它的内容显示在网页窗口的标题栏中,网页标题可被浏览器用做书签和收藏清单。

参考资料来源:百度百科-html代码

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

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

2、在index.html中的<body>标签中,输入html代码:

<input style="border-top:0border-left:0border-right:0" type="text" value="测试文本" />。

3、浏览器运行index.html页面,此时文本框成功变为了一个横线。

用input页面标签

并将下Border设为直线

<style>

input[type="text"]{border-bottom:solid 1px #ccc}

<style>

<input type="text"/>

1、两头渐变透明:

<HR style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="80%" color=#987cb9 SIZE=3>

2、纺锤形:

<HR style="FILTER: alpha(opacity=100,finishopacity=0,style=2)" width="80%" color=#987cb9 SIZE=10>

3、右边渐变透明:

<HR style="FILTER: alpha(opacity=100,finishopacity=0,style=1)" width="80%" color=#987cb9 SIZE=3>