html中的文本区域成为焦点 [英] text area in html jumps on focus
本文介绍了html中的文本区域成为焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在文本区域有一个html标记,如下所示...
i have a html tag for text area as below...
<div>
<span class="l" style="padding-top: 77px">
<textarea id="txt7" rows="3" cols="50">Lorem ipsum</textarea>
</span>
</div>
重点是我正在更改边框颜色和边框宽度,效果很好. 当我确实专注于该元素文本区域框时,该问题会在页面上跳转(意味着移动了一点…….)
on focus i am changing border color and border width it worked fine. the problem when i do focus on that element text area box jumps on the page (means moves a little bit....)
css:
textarea:focus { .br; border-style: solid; .shdw; }
因此可以解决这个问题.........
so any work around to this plz.............
如何使用box-shawdow属性.....我不知道如何使用它........ so对此有何帮助.........
how abt using box-shawdow property .....i am not aware of using it ........so do any help there on this............
推荐答案
将其扔到CSS中,它将保留在应有的位置. - 希望这可以帮助.
Throw that in your css and it will stay where it is supposed to. - Hope this helps.
#txt7{
position:absolute;
}
这篇关于html中的文本区域成为焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文