如何定位工具提示以显示整个内容,而无需向下滚动页面以查看整个内容


<a class="ctooltip" tooltip="Definition:1000 characters here 
onclick="openDocumentTypeHistory(2110)" href="#" >mytestdocument</a>

我的 CSS 函数

.ctooltip{
    display: inline;
    position: relative;
}
              .ctooltip:hover:after{
    background: #F5F5F5;
    border-radius: 2px;
        border-color: #000000;
        border-style: ridge;
        border-width: 1px;
        top: 26px;
        text-decoration: none;
    color: #1d3030; 
    left: 20%;
        content: attr(tooltip);
    padding: 5px 15px;
         position: absolute;
    z-index: 98;
        width: 220px;
       max-width: 220px;
}
       a:hover {text-decoration: none; }

我想显示整个工具提示消息,长度为 1000 个字符,而无需用户向下滚动页面以查看工具提示内容

只需增加工具提示宽度即可。 1000 个字符的高度与宽度220px太大。 因此,您只需要增加工具提示宽度即可降低高度。

最新更新