2014-06-11 107 views

回答

2

我更新了提琴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> 

使用位置絕對關閉按鈕和相對位置的字段集

+1

改變,要頂:-5px和多數民衆差不多了。 – Ruddy

+0

更新小提琴;) – mador

+0

非常感謝您的答案。但仍然想知道是否有可能打破頂線並在那裏放置一個關閉按鈕? – olgacosta