大家好,我已经在我的输入文本和文本区域设置了背景图像,但我有一些小问题
我有附图。如何更改名称文本输入中的文本起始位置?
我的文本区域比我的背景图片要大
这是带有样式的我的名字文本输入
input type="text" name="txtName" class="input" />
.input
{
border: 0px solid #444444;
height:39px;
width:346px;
background:url(images/Contact_05.jpg) no-repeat right top;
color:#fff;
padding-left:4px;
font-size:20px;
}
这是我的文本区
<textarea rows="5" cols="0" class="inputMessage"></textarea>
.inputMessage
{
border:0px solid #444444;
height:386px;
width:685px;
background:url(images/Contact_20.jpg) no-repeat left top;
padding-left:4px;
color:#fff;
font-size:20px; resize:none;
}
有什么建议吗?
发布于 2012-01-13 07:00:54
在你的输入中将padding设置为一个更大的值,并减小文本区域的宽度。
在设计表单时,最好在输入周围放置一个临时边框,以查看它们的实际位置,完成后,只需将其去掉即可。
发布于 2012-01-15 00:25:04
padding:10px;
(或更多)在input
和textarea
上。
https://stackoverflow.com/questions/8843571
复制相似问题