本文介绍了将填充添加到HTML文本输入字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在< input type =text/>
的右侧添加一些空格,以便在字段右侧有一些空白
I want to add some space to the right of an <input type="text" />
so that there's some empty space on the right of the field.
因此,除了,我会得到.
So, instead of , I'd get .
所以,同样的行为只是一些空的空间在右边。
So, same behavior just some empty space to the right.
我尝试过使用 padding-right
,但似乎没有做任何事情。
I've tried using padding-right
, but that doesn't seem to do anything.
有办法做这个(或假的)吗?
Is there a way to do this (or fake it)?
推荐答案
padding-right我在Firefox / Chrome在Windows上,但不是在IE。欢迎来到IE标准不合规的美妙世界。
padding-right works for me in Firefox/Chrome on Windows but not in IE. Welcome to the wonderful world of IE standards non-compliance.
请参阅:
HTML
<input type="text" class="foo" value="abcdefghijklmnopqrstuvwxyz"/>
CSS
.foo
{
padding-right: 20px;
}
这篇关于将填充添加到HTML文本输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!