2017-03-12 42 views
0

我使用Foundation6和我的显示模式不工作(有刚有滚动到顶部,当我点击链接),但我读过的文档基金会(http://foundation.zurb.com/sites/docs/v/5.5.3/components/reveal.html显示模式Foundation6

所以这是我的代码:

<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> 

我在命令行安装基础。

+0

你正在使用哪个Foundation版本?,如你所说你有命令行界面,请使用'foundation -v' –

回答

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> 

并打开它的链接:您正在使用的版本,所以你可以使用适当的类和ID在您的特定

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

解析案件。