【发布时间】:2016-02-17 05:05:29
【问题描述】:
我正在使用 ruby on rails 4.2.2 和 gem foundation-rails 6.1.2。 我已经安装了文档中的所有内容,现在尝试制作简单的显示模式窗口,例如基础文档here
我已经导入了motion-ui,但是还是不行。以下是 slim 中的代码:
.reveal#exampleModal1 data-reveal='data-reveal'
h1 Awesome. I Have It.
p.lead Your couch. It is mine.
p I'm a cool paragraph that lives inside of an even cooler modal. Wins!
button.close-button data-close="data-close" aria-label="Close modal" type="button"
span aria-hidden="true"×
以及打开modal的链接本身:
a.open-modal data-open="exampleModal1" Open modal
所以模态正在打开,但第一次打开的样式很奇怪。它太宽(内联样式被添加到模态)并且关闭按钮不会关闭模态。如果我通过单击模态或 ESQ 外部关闭模态 - 它已关闭。我第二次打开显示时,它的正确宽度为 600 像素(控制台中的样式窗格显示现在样式来自某个 css 文件)。但是关闭按钮仍然不起作用。
我做错了什么?有任何想法吗?谢谢
【问题讨论】:
标签: css ruby-on-rails ruby-on-rails-4 rubygems zurb-foundation