.element {
display: table;
table-layout: fixed;
width: 100%;
}
.truncate {
display: table-cell;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
예제)
<li class="element">
<a href="#" class="truncate">
내용
</a>
</li>
'개발이야기 > css' 카테고리의 다른 글
이미지 중앙 노출(로딩) (0) | 2023.03.22 |
---|