我将 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"×
以及打开模态的链接本身:
a.open-modal data-open="exampleModal1" Open modal
所以模式正在打开,但第一次打开的样式很奇怪。它太宽(内联样式被添加到模态)并且关闭按钮不会关闭模态。如果我通过在模态或 ESQ 外部单击来关闭模态 - 它已关闭。我第二次打开显示时,它的正确宽度为 600 像素(控制台中的样式 Pane 显示现在样式来自某些 css 文件)。但是关闭按钮仍然不起作用。
我做错了什么?有任何想法吗?谢谢
最佳答案
哦,由于打开了 issue,处理关闭按钮很容易在知乎上
如问题所述,初始样式仍然存在问题..
关于css - 挣扎着关闭地基中的显示窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35448335/