.parent{
width:100px;
}
.ellipsis{
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
white-space: nowrap;
}
<div class="parent">
<div class="ellipsis">Lorem ipsum dolor sit amet.</div>
<div>(AED)</div>
</div>
AED와 줄임표를 같은 줄에 표시하고 싶습니다. 이것을 달성하는 방법.
미리 감사드립니다
이를 달성하기 위해 display: flex
parent div
에 속성을 사용할 수 있으며 flex
자식 사이에 공간을 분배하도록 속성을 설정할 수 있습니다.
.parent{
width:100px;
display: flex;
}
.ellipsis{
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
white-space: nowrap;
}
<div class="parent">
<div class="ellipsis">Lorem ipsum dolor sit amet.</div>
<div>(AED)</div>
</div>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다