gpt4 book ai didi

html - 向字段集添加关闭按钮

转载 作者:可可西里 更新时间:2023-11-01 13:10:23 26 4
gpt4 key购买 nike

我创建了带有一些文本框的 html fieldsetenter image description here

我想像这样仅使用 css 向字段集添加一个关闭按钮。 enter image description here

这可能吗?如果是,请帮助我。这是我的 jsfiddle

最佳答案

我更新了你的 fiddle http://jsfiddle.net/ukx35/18/

<fieldset style="position:relative">
<legend>Title</legend>
<input type="text"/>
<button style="position: absolute;right:10px;top:-5px;outline:5px solid #fff">
<img src="http://icons.iconarchive.com/icons/hopstarter/sleek-xp-basic/16/Close-2-icon.png"/>
</button>
</fieldset>

关闭按钮使用绝对位置,字段集使用相对位置

关于html - 向字段集添加关闭按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24165303/

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