gpt4 book ai didi

html - 在 textarea 上定位文本

转载 作者:太空狗 更新时间:2023-10-29 14:56:04 25 4
gpt4 key购买 nike

我想在我的文本区域的右上角添加一个 div/文本。

HTML

<div id="textarea-container">
<textarea></textarea>
<div id="copy">copy</div>
</div>

CSS

div#textarea-container {
position: absolute;
}

div#copy {
position: relative;
right: 0;
}

需要做哪些调整?

jsFiddle: http://jsfiddle.net/zrpgK/

最佳答案

工作 jsfiddle 代码 jsfiddle

div#textarea-container {
position: relative;
float: left;
}
div#copy {
position: absolute;
right: 5px;
top: 0;
}

关于html - 在 textarea 上定位文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15577166/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com