Fandom Developers Wiki
Advertisement

本页面或其中部分内容仍未翻译。请将其翻译为适当的语言(中文(简体))。

WdsTooltips是一个基于Fandom设计系统设计的小提示工具,最大的优点是在桌面版和手机版都可以显示。当你把鼠标放在相应内容上或者触碰它,一个包含提示内容的小窗口就会出现。

安装[]

不安装JS也是可以使用的,JS只是用来修复弹窗的位置以及内部的图片,如果你不需要使用进阶的用法,在你的wiki添加以下代码就够了。

JS Installation[]

CSS Installation[]

wiki代码[]

示例[]

普通用法
哈喽,这是一些文字~
进阶用法
WdsTooltips mercury

把图片也塞进来了

你甚至可以使用wikitext:

表格
Header 1 Header 2
Cell 1 Cell 2
An 
inline-level
In CSS, content that participates in inline layout is called inline-level content.
 tooltip

Customization[]

In UCP, WDS dropdowns are used in combination with WDS lists. As we are manipulating the dropdowns as tooltips instead, a few fixes are necessary. Details on customizability and available WDS classes can be found in WdsTooltips/Customization.

Usage Notes[]

WdsTooltips is extensively based on WDS and MediaWiki. Thus, users might often encounter issues when setting it up. WdsTooltips/Usage Notes provides detailed information on such cases along with troubleshooting them.

Mobile Accessibility[]

The javascript is not functional on mobile skin due to customization restrictions. Additionally, the functioning of tooltips slightly differs from that in desktop skin. To prevent from creating possible mobile inaccessibilities, see WdsTooltips/Mobile Accessibility.

Disclaimer[]

This script is targeted towards wikis in need of extended formatting for mobile-compatible tooltips. For simple text-only usecases, CSS3Tooltip is highly recommended.

参阅[]

  • TippingOver - an extension similar to Tooltips.js
  • CSS3Tooltip - a tooltip plugin made with CSS3 only.
  • Tooltips - a tooltip plugin with advanced configuration.
Advertisement