我想在tippyjs中使用一些类在调用这些类时更改代码,但我不知道如何使用它们
new Tippy('.tooltip.fade.bottom.in {}', {
position: 'top',
animation: 'scale',
arrow: 'true',
});
欢迎来到 SO!
正如Tippy JS 文档中所述:
tippy($('#someElementId'))
替换 #someElementId 来初始化tippytippy('button');
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
<link rel="stylesheet" href="https://unpkg.com/tippy.js@5/dist/backdrop.css" />
<button data-tippy-content="Tooltip">Text</button>