Using PIE.htc in rails

前提是你 提交于 2019-12-22 14:52:17

问题


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); 

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


回答1:


Your statement is almost correct. It should be:

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

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

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.



来源:https://stackoverflow.com/questions/15483371/using-pie-htc-in-rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!