2017-03-12 38 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> 

解析案件。