IE中 input 获取不到焦点
代码:<pclass="t_wr"><spanclass="inp_text">请输入手机号/邮箱/用户名</span><inputtype="text"id="u_n"...
代码:
<p class="t_wr"><span class="inp_text">请输入手机号/邮箱/用户名</span><input type="text" id="u_n" class="wd" value="" /></p>
<p class="t_wr"><span class="inp_text">请输入密码</span><input type="password" id="p_w" class="wd" value="" /></p>
CSS:
.t_wr {position:relative; z-index:0; width:260px; height:40px;}
.t_wr .inp_text {position:absolute; top:0; left:0; z-index:0; width:250px; height:40px; padding-left:8px; background:url(../img/bg-ss.png) no-repeat 1px 1px; color:#999; line-height:40px;}
.t_wr .wd {position:absolute; top:0; left:0; z-index:9; width:248px; height:38px; padding-left:8px; border-width:1px; border-style:solid; border-color:#aeaeae #dadada #dadada #aeaeae; background:transparent; color:#999; line-height:38px\9; outline:none;}
效果图:
IE中,当鼠标点击在文字上,input获取不到焦点,必须点击在input内非文字的位置才能获取到焦点,谷歌火狐中没问题,请教如何解决 展开
<p class="t_wr"><span class="inp_text">请输入手机号/邮箱/用户名</span><input type="text" id="u_n" class="wd" value="" /></p>
<p class="t_wr"><span class="inp_text">请输入密码</span><input type="password" id="p_w" class="wd" value="" /></p>
CSS:
.t_wr {position:relative; z-index:0; width:260px; height:40px;}
.t_wr .inp_text {position:absolute; top:0; left:0; z-index:0; width:250px; height:40px; padding-left:8px; background:url(../img/bg-ss.png) no-repeat 1px 1px; color:#999; line-height:40px;}
.t_wr .wd {position:absolute; top:0; left:0; z-index:9; width:248px; height:38px; padding-left:8px; border-width:1px; border-style:solid; border-color:#aeaeae #dadada #dadada #aeaeae; background:transparent; color:#999; line-height:38px\9; outline:none;}
效果图:
IE中,当鼠标点击在文字上,input获取不到焦点,必须点击在input内非文字的位置才能获取到焦点,谷歌火狐中没问题,请教如何解决 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询