2013-01-24 36 views

回答

4

嘗試:

<td style="position: relative;"> 
<div style="position: absolute;right: 0;top:0;">@Html.ImageContent("triangle_bonus.png", "")</div> 
</td> 

如何改變你的HTML:

<td class="triangle"> 
<div>@Html.ImageContent("triangle_bonus.png", "")</div> 
</td> 

並添加這,你的頭HTML:

<style> 
td.triangle {position:relative} 
td.triangle div {position:absolute; right:0; top:0;} 
</style> 

看看這個,例如: http://jsfiddle.net/Juvcx/

+0

這是神奇的感謝。 – Mediator

+0

但我不能在td中使用relative。但td有任何元素違反他們的工作 – Mediator

+0

嗨,我已經編輯了上面的答案。這有幫助嗎? –