首页 > 有没有人遇到过这种问题:input框移动,但是框内文字移动不同步

有没有人遇到过这种问题:input框移动,但是框内文字移动不同步

input框的位置会来回动,但是里面的内容却总是往下走
原始状态:

input位置下降后:

input回到原来位置:

代码:

css:        #i_talk{
            border:1px solid #ccc;
            border-radius:6px;
            -moz-border-radius:6px; /* Old Firefox */
            width: 509px;
            height: 44px;
            position: absolute;
            left: 52px;
            top:313px;
            z-index: 1000;
            text-align: left;
            vertical-align: middle;
        }
html:
   <span id="choose_talk">选择话题</span>
             <br>
  <input type="text" id="i_talk" name="talk" value=" 搜索提案所属的话题" style="color:#838B83;">
js:
   $("#insert_a").click(function(){
    if($("#middle").css("height") != "203px")
    {
        //$("#middle").css("height","203px");
        //$("#hypomere").css("top","330px");
        //$("#sub").css("top","370px");
        //$("#choose_talk").css("top","294px");
        $("#i_talk").css("top","313px");
    }
    else{
       // $("#middle").css("height","233px");
        //$("#hypomere").css("top","360px");
       // $("#sub").css("top","400px");
       // $("#choose_talk").css("top","324px");
        $("#i_talk").css("top","343px");
    }
})

这貌似是浏览器兼容性问题,你换个浏览器试试

【热门文章】
【热门文章】