Search code examples
htmlcssstylesheet

Why does the link tag sometimes not work while style tag works?


I was playing with Path 2.0 flying menu (http://codepen.io/sparanoid/pen/nHAmi) earlier and realized once I remove the link style tag from the index.html and put them into css files to link back to the file, the web page doesn't work as it was before anymore.

The link tag I use is very standard:

<link rel="stylesheet" href="css/style.css" type="text/css"/>

This link tag replaces the second style tags in the example files. I searched online and there is no documentations about some condition when only the style tag could work.

I suspect that the reason might be prefixfree.js cannot interpret css files (but can interpret style tags). I wonder if that's the reason, how I can set up correct interpreter for prefixfree.js.


Solution

  • Try not to use prefixFree. It's a buggy plugin. It doesn't always work with webkit based browser such as Safari, Chrome, or Opera even when set up a remove server (and certainly do not work when using local files).