开放式造型;不起作用

Opentip styling doesn't work

本文关键字:不起作用 造型 开放式      更新时间:2023-12-24

我使用opentip,并尝试使用自定义样式设计opentip。

这些是我在咖啡里面的密码。

Opentip.styles.orangetip = { 
  stem: true,
  borderColor: "#ffa358",
  borderWidth: "50",
  background: "#ffa358",
  fixed: true,
  stemLength: "10"
  }

我甚至使用这个块将我的样式设置为默认样式,但它仍然不起作用。

Opentip.defaultStyle = "orangetip"

这是我的脚本调用风格。

tip1 = new Opentip("#testong", "Optional content", { 
  style: "orangetip", 
  showOn: "mouseover"
})

样式未加载,但showOn正在工作。例如,如果我将"mouseover"更改为"click",容器将显示为click,而不是悬停。

有人知道为什么这个样式不加载吗?非常感谢。

我已经找到了答案。

问题是因为我使用"表示整数值。

所以,它一定是:

Opentip.styles.orangetip = { 
  stem: true,
  borderColor: "#ffa358",
  borderWidth: 50,
  background: "#ffa358",
  fixed: true,
  stemLength: 10
}