2012-06-13 4 views

답변

3

position: absolute을 사용하여 요소 위치 자체를 부모 (이 경우 우물)에 상대적인 절대 위치에 만들 수 있습니다. 유일한 요소는 부모 요소가 정적 요소가 아니면 안되기 때문에 우물을 다른 요소에 포함해야 할 수도 있습니다.

.my-well { 
    position: relative; 
} 

.my-well span { 
    position: absolute; 
    top: 0; 
    right: 0; 
} 

<div class="well my-well"> 
    <span>xxx</span> 
</div>​ 

http://jsfiddle.net/YPcLy/