css超出10个字省略号
时间: 2023-08-17 22:11:01 浏览: 186
回答: 要实现CSS超出10个字显示省略号,可以使用以下代码:
```css
p {
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
```
这段代码将会使得超出10个字的文本在元素内部显示省略号。\[3\]
#### 引用[.reference_title]
- *1* *3* [css文本超出显示省略号](https://blog.csdn.net/zoepriselife316/article/details/126125108)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [css 文字超出三行展示省略号](https://blog.csdn.net/weixin_50136354/article/details/126715704)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文