【发布时间】:2012-09-03 23:53:11
【问题描述】:
有人知道如何在 HTML 中使用 Form 或 Input 标签隐藏边框吗?
我的代码如下:
<form name="timerform">
Your session will expired in
<input type="text" name="clock" size="7" value="5:00">
</form>
【问题讨论】:
有人知道如何在 HTML 中使用 Form 或 Input 标签隐藏边框吗?
我的代码如下:
<form name="timerform">
Your session will expired in
<input type="text" name="clock" size="7" value="5:00">
</form>
【问题讨论】:
你也可以使用
input[type="text"] { border: none }
当您有其他输入类型时,这很有用,即type="submit",但 IE
检查this with type 和this without type。
更新:也可以如下使用
<input style="border:none" type="text" name="clock" size="7" value="5:00">
【讨论】:
<style type="text/css">input { border: none; }</style>
<div align="center" class="input"> <font size="-2" face="verdana" color="#264F8A"> <form name="timerform"> Your session will expired in <input type="text" name="clock" size="7" value="5:00"> </form> </font> </span> </div>
<input type="text" name="clock" size="7" value="5:00">原来的盒子是白色的,所以我的背景页面是灰色的,所以如何使盒子透明。
outline:none。
在 CSS 中设置样式。 CSS 可以内嵌在网页的 HEAD 部分...
<head>
<style type="text/css">
input { border: none }
/* other style definitions go here */
</style>
</head>
<body>
<!-- your HTML code below... -->
或者在你的情况下可能是最简单的:
<form name="timerform">
Your session will expired in
<input type="text" name="clock" size="7" value="5:00" style="border:none" />
</form>
取决于你想用这个页面做多少。延伸阅读:http://www.w3schools.com/css/css_howto.asp
【讨论】: