用户登录
用户注册

分享至

dreamweaver 下划线

  • 作者: 老板加份肉可否
  • 来源: 51数据库
  • 2020-09-26
代码如下:
<span style="border-bottom:#000 solid 1px;"> </span>
其中空白地方通过全角状态下打空格,或是加入若干个?或者使用DIV
<div style="width:240px; border-bottom:#333 solid 1px;"></div>
其中在样式修改width后面的数值来改变下划线的长短!
或者使用表格或文本框,道理都是一样的!



  我想楼主所说的带下划线的空白处在页面中是个能填写数字或文字的输入框吧?否则他就是个摆设了。

如果是输入框的话,可以通过css定义来修改它的样式。

直接使用style方式定义:
<input type="text" name="textfield" style="border:0;border-bottom:1px solid #000;width:50px;"></input>

上面的方法仅适用于某一个输入框,如果输入框有很多,可以定义一个class。

在源代码中<head></head>中加入
<style type="text/css">
<!--
.underline {border:0;border-bottom:1px solid #000;width:50px;}
-->
</style>

然后在html中的input处引用它:

<input type="text" name="textfield" class="underline"></input>

css中的宽度width:50px;和颜色#000可以根据自己的需求调节。



  加一个表格,高设成1然后去代码里把那个空格删旧就行了。
另一种是设css,在css里把它的三边设为无色,一边设为有色,边框为1就行了。
软件
前端设计
程序设计
Java相关