在IE中更改占位符文本的字体大小和边距

问题描述:

我有一个带有某个占位符的文本输入:

I have a text input with some placeholder:

<input type="text" placeholder="placeholder"/>

我想让占位符文本小于输入的文本:

I would like to make the placeholder text smaller than the input's text:

input {
    font-size: 20px;
}
input:-ms-input-placeholder{
    font-size:5px;
}
input::-webkit-input-placeholder {
    font-size:5px;
}

这在Chrome中工作得很好,但是IE会缩小整个输入框显示文本。然后当我点击键入时展开框。这是一个小提琴: http://jsfiddle.net/Brn6h/3/

This works well in Chrome, but IE shrinks the whole input box when the placeholder text is displayed. It then expands the box when I click to type. Here's a fiddle: http://jsfiddle.net/Brn6h/3/

如何使输入框在IE中保持相同的大小?

How do I make the input box stay the same size in IE?

input {
        font-size: 20px;
        height: 20px;
        width: 200px;
    }

JSFiddle

JSFiddle