html如何把输入的文本框变成一个下横线样式?
1个回答
展开全部
给这个input输入框加下边框就可以了,下面是我前几天刚写的一个,能实现你所要的效果。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>form元素特殊效果</title>
<style type="text/css">
#text{
border-bottom:#666 1px solid;
border-left-width:0px;
border-right-width:0px;
border-top-width:0px;}
#submit{
/*
border: #666 1px solid;显示边框*/
border:0;
line-height:20px;
background-color:transparent;}
</style>
</head>
<body>
<input type="text" name="text" id="text" />
<input type="submit" value="提交" name="submit" id="submit" />
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>form元素特殊效果</title>
<style type="text/css">
#text{
border-bottom:#666 1px solid;
border-left-width:0px;
border-right-width:0px;
border-top-width:0px;}
#submit{
/*
border: #666 1px solid;显示边框*/
border:0;
line-height:20px;
background-color:transparent;}
</style>
</head>
<body>
<input type="text" name="text" id="text" />
<input type="submit" value="提交" name="submit" id="submit" />
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询