简体   繁体   English

在CSS中控制省略号样式

[英]Controlling ellipsis style in CSS

I implement Search in a web application that looks similar to the browser's "Find" feature. 我在看起来类似于浏览器“查找”功能的Web应用程序中实现了搜索。 I want to highlight the searched strings on the page. 我想突出显示页面上搜索到的字符串。 The search-string is often a substring of longer string that is shown with ellipsis. 搜索字符串通常是较长的字符串的子字符串,用省略号显示。

I want to highlight the search-string wherever it appears, and if it is found in the part of text replaced by ellipsis, then I want to highlight the ellipsis itself. 我想突出显示搜索字符串,无论它出现在什么地方,如果在用省略号代替的文本部分中找到它,那么我想突出显示省略号本身。

How can I do that? 我怎样才能做到这一点?

Use the following components to implement it: 使用以下组件来实现它:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM