绝对定位在文本区域中对齐
我想实现这样的目标。 http://jsfiddle.net/dpnay/。右下角会出现一个文本区域,其中包含一些文本和名称。到目前为止,我使用绝对定位来修复名称文本。
我的问题是,当我输入长文本时,我输入的文本将覆盖名称文本(除非我向下滚动按钮)。有什么解决方案可以使用 CSS 使 textarea 上的文本不覆盖名称文本吗?因为我还没有准备好使用javascript。
谢谢你的建议。
I want to achieve something like this. http://jsfiddle.net/dpnay/. A textarea with some text inside and a name appear right down corner. So far I used absolute positioning to fixed the name text.
My problem is, when I type a long text, the text I typed will cover the name text (unless I scroll down the button). Is there any solution to make the text on textarea didn't cover the name text by using CSS? Because I'm not prepare for using javascript.
Thanks for the advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的解决方案是将“签名”文本实际放置在文本区域下方,但仅将边框放置在周围的 div 上。我在 此处 上用 jsFiddle 上的 CSS 制作了一个示例。
The easiest solution is to actually put the "signature" text below the textarea, but only put the border on the surrounding
div
. I've made an example from the CSS on your jsFiddle here.