简体   繁体   English

TAG部分的Zurb Foundation 5数据公开

[英]Zurb Foundation 5 data-reveal in section TAG

I'm trying to get work modal window in Zurb Foundation 5 on SECTION HTML tag, I get darken page without the windows, just passing the data attribute doesn't work. 我试图在Zurb Foundation 5的SECTION HTML标记上获取工作模式窗口,但没有窗口却使页面变暗,只是传递data属性无效。 This modal window works perfectly as a href="#" tag. 此模式窗口可完美用作href =“#”标签。

Is it possible to use it in common tag? 是否可以在通用标签中使用它?

Section tag code: 区段标记代码:

<section class="box" onclick="window.location.href='#'" data-reveal-id="myModal-1">

Box: 框:

<div id="myModal-1" class="reveal-modal medium">
  <h1>Header</h1>
  <p>Lorem ipsum</p>
  <a class="close-reveal-modal">&#215;</a>
</div>

You are missing the data-reveal attribute in your modal dialog div, by setting it works fine. 通过设置它工作正常,您将在模态对话框div中缺少data-reveal属性。

For me work with section elements too with no problems. 对我来说,也可以毫无问题地处理节元素。

Code: 码:

<div id="myModal-1" class="reveal-modal medium" data-reveal>
  <h1>Header</h1>
  <p>Lorem ipsum</p>
  <a class="close-reveal-modal">&#215;</a>
</div>

Demo: http://jsfiddle.net/IrvinDominin/9DAPc/ 演示: http : //jsfiddle.net/IrvinDominin/9DAPc/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM