div 有一定的宽度,里面的文本动态地来自 API,并且有省略号样式。我无法提供文本的宽度,因为文本是完全动态的并且不确定文本长度。下面是解释该问题的代码。
body {
background-color: lightblue;
}
.container {
display: flex;
width: 130px;
}
.d-flex {
display: flex;
}
.flex-column {
flex-direction: column;
}
.justify-content-center {
justify-content: center;
}
.justify-content-between {
justify-content: space-between;
}
.table-header__width-ellipses {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
}
Long text included here
Long text included here![]()
我正在尝试为表格样式生成这样的内容。有人可以帮我解决这个问题吗?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号