В Html, если нам нужно отобразить текст при наведении на текст, какой должен быть Css для него. Вот задание, которое нужно выполнить аналогично данному изображению. Образец задачи, которую необходимо выполнить
<mat-expansion-panel-header [collapsedHeight] = "'40px'" [expandedHeight] = "'40px'"
style = "margin-left: 50px;border-bottom: 1px solid #4c4c4c;">
<mat-panel-title
style = "text-decoration: none;color: #FFFFFF;font-size: 15px;font-family: sans-serif;font-weight: 700;width: 209px;overflow: hidden;text-overflow: ellipsis; word-break: break-all;white-space: nowrap;"
>
{{category.CategoryName}}
</mat-panel-title>
<mat-panel-description *ngIf = "!category.Expanded"
style = "margin-left: -4px;margin-right: -6px;">
<mat-icon style = "color: #FFFFFF;">keyboard_arrow_down</mat-icon>
</mat-panel-description>
<mat-panel-description *ngIf = "category.Expanded"
style = "margin-left: -4px;margin-right: -6px;">
<mat-icon style = "color: #FFFFFF;">keyboard_arrow_up</mat-icon>
</mat-panel-description>
</mat-expansion-panel-header>
пожалуйста, добавьте свой код и создайте фрагмент кода.



![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Надеюсь, это поможет вам. Спасибо
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip button:hover+.tooltiptext {
visibility: visible;
}<div class = "tooltip"> <button>Tooltip Button</button>
<span class = "tooltiptext">Tooltip text</span>
</div><!DOCTYPE html>
<html>
<style>
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
</style>
<body style = "text-align:center;">
<p>Move the mouse over the text below:</p>
<div class = "tooltip">Hover over me toolTip using Css
<span class = "tooltiptext">Tooltip text</span>
</div>
<p title = "someText">This is a paragraph with Tooltip set using Title attribute.</p>
</body>
</html>Может быть два разных способа создания всплывающей подсказки.
приведенный выше пример покажет вам как использование, так и более подробную информацию и настройку, которую вы можете посетить здесь.
я уже предложил этот ответ.
Пожалуйста, проверьте это
.hoverer {
position: relative;
margin-top: 30px;
}
.hoverer:hover::after {
content: attr(hover-text);
position: absolute;
top: -25px;
left: 0;
font-size: 13px;
border: 1px solid #333333;
padding: 2px 5px;
border-radius: 5px;
background-image: linear-gradient(to bottom, #effdfe, #a2ecf5);
}<p class = "hoverer" hover-text = "hello i am hovered text">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab a sint cumque, minus impedit. Earum, debitis quidem natus dolores aliquid libero ipsum doloremque eum repellendus voluptate blanditiis, omnis molestias cumque!
</p>Я не думаю, что это ответ на вопрос. ОП нуждается в подсказке.
mat-tooltip может быть хорошим вариантом для использования.
Вы спрашиваете о всплывающей подсказке, которую мы получаем при наведении курсора на любую кнопку или текст?