揭示模态基础6

时间:2017-03-12 13:32:36

标签: html5 zurb-foundation

我正在使用Foundation6,我的揭密模式不起作用(当我点击链接时只有一个滚动到顶部)

但是我已经阅读了基础文档(http://foundation.zurb.com/sites/docs/v/5.5.3/components/reveal.html)!

所以这是我的代码:

<a href="#" class="button green" data-reveal-id="addMusic">
    <i class='fi-plus medium'></i>&nbsp;
    <strong>Ajouter une musique</strong>
</a>

<div id="addMusic" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
    <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
    <a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>

我在命令行安装了Foundation。

1 个答案:

答案 0 :(得分:1)

You need to be reading the v6 docs for Foundation如果您正在使用它。

这是模态示例:

<div class="reveal" id="exampleModal1" data-reveal>
  <h1>Awesome. I Have It.</h1>
  <p class="lead">Your couch. It is mine.</p>
  <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
  <button class="close-button" data-close aria-label="Close modal" type="button">
    <span aria-hidden="true">&times;</span>
  </button>
</div>

打开它的链接:

<a data-open="exampleModal1">Click me for a modal</a>

解决您正在使用的版本,以便在特定情况下使用正确的类和ID。