gpt4 book ai didi

html - 为什么棘轮组件无法正确呈现

转载 作者:太空宇宙 更新时间:2023-11-03 23:37:11 25 4
gpt4 key购买 nike

这是我的 Fiddle .我从 Segmented Control 添加了 CSS 组件并添加了相关的库,但没有按预期工作,就像在网站中一样:

<div class="segmented-control">
... Control components...
</div>
<div class="card">
... control content
</div>

最佳答案

您将需要检查 Getting Started页面,然后通读。

这些片段在 jsFiddle 中不起作用,因为它们只响应“触摸”事件(如在移动设备上)而不响应“点击”事件(如在 PC 上)。

来自GitHub - Ratchet文档。

Ratchet is designed to respond to touch events from a mobile device. In order to use mouse click events (for desktop browsing and testing), you have a few options: Enable touch event emulation in Chrome (found in the overrides tab in the web inspector preferences) Use a JavaScript library like fingerblast.js to emulate touch events (ideally only loaded from desktop devices)

此外,由于一些原因,某些样式缺失。

  • 组件示例具有框架中没有的额外样式。
  • 您的 jsFiddle 缺少一个 <div class="content"> wrapper 。
  • > This jsFiddle更近了,但由于上面的触摸事件问题,仍然无法完全工作,但至少它为您指明了正确的方向。

关于html - 为什么棘轮组件无法正确呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23775376/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com