CSS 技巧:自定义 Tooltip 文字放大
.custom-tooltip::after { content: attr(data-tooltip); display: none; position: absolute; top: -382%; min-width: 550px; left: 50%; z-index: 999; transform: translateX(-10%); background-color: #FFF8C3; border: 1px solid #B5AC85; white-space: inherit; color: #000; padding: 4px 8px; border-radius: 4px; font-size: 20px; /* 添加字体大小属性 */ }
.custom-tooltip:hover::after { display: block; }
要在框内的文字内容放大,您可以使用 CSS 的 font-size 属性来实现。请将以上代码添加到 .custom-tooltip::after 选择器中,并根据需要调整字体大小的数值。
AI 优化版
原文地址:https://www.cveoy.top/t/topic/qFjC 著作权归作者所有。请勿转载和采集!