问题
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