How to create a tooltip only when ellipsis is active ? I want the solution only in CSS

The following code gives a long text , but I want as tooltip .

.truncate {   max-width: 160px;   overflow: hidden;   display: inline-block;   text-overflow: ellipsis;   white-space: nowrap; }  .truncate:hover {   text-overflow: clip;   white-space: normal;   word-break: break-all; }
<span class="truncate"> HERE</span>

Asked on September 1, 2020 in CSS.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.