这里有两个问题:
1) 占位符
2) 光标文本缩进
首先,我在谷歌上搜索了一下,知道占位符是 HTML5 的一项功能,在 IE8 中不受支持。有替代解决方案吗?
其次,在 IE8 中,光标不以文本缩进开头。
HTML:
<input autofocus="autofocus" id="home_email_input" name="username" placeholder="E-mail" type="text">
<input id="home_pw_input" name="password" placeholder="PW" type="password">
CSS:
#home_email_input {
margin-left: 22px;
margin-bottom: 10px;
width: 183px;
background: url(/images/envelope.gif) no-repeat scroll 4px 3px;
text-indent: 30px;
}
#home_pw_input {
margin-left: 22px;
margin-bottom: 10px;
width: 183px;
background: url(/images/lock.gif) no-repeat 5px -0.5px;
text-indent: 30px;
}
最佳答案
关于html - IE8 文本缩进和占位符问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21046130/