在Rails中使用PIE.htc [英] Using PIE.htc in rails

查看:89
本文介绍了在Rails中使用PIE.htc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Rails应用程序中使用PIE,但无法正常工作. 我将PIE.htc文件放在资产文件夹中的行为"文件夹中.

I'm trying to use PIE in my rails app but its not working. I placed my PIE.htc file inside a folder called behaviours in my assets folder.

  -pie-background: linear-gradient(#2c2a2d, #1f1e20);
  behavior: url(assets/behaviours/PIE.htc); 

有人知道这是否是使Rails和Pie工作的正确路径. 这也在localhost:3000/

Does anyone know if this would be the correct path for rails and pie to work. This is also running on a localhost:3000/

推荐答案

您的陈述几乎是正确的.应该是:

Your statement is almost correct. It should be:

behavior: url(/assets/PIE.htc);

您需要有一个斜杠,并删除对behaviors文件夹的引用.

You need to have the initial slash and take out the reference to the behaviors folder.

此外,如果您要完全确定正在加载PIE.htc文件,请打开该文件并添加警报,如下所示:

Also, if you want to be completely sure that the PIE.htc file is being loaded, open it and add an alert as so:

<script>alert("PIE works");</script>

如果文件已加载,则会出现一个弹出窗口,显示该消息.

If the file if being loaded, a popup should appear showing the message.

这篇关于在Rails中使用PIE.htc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆