jquery mobile css file loads remotely but not locally
As you can see, this jquery mobile app, loads and renders the CSS just fine with this line in the main index.html -
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
However attempting load it as follows:
<link rel="stylesheet" href="jquery.mobile-1.0a4.1.min.css" />
fails, even though 开发者_StackOverflowthe file is right there in the root directory since the webapp is a direct checkout of my github repository.
I may be looking in the wrong spot, but when I open the .css
file in your github repository, I see minified jquery code. Perhaps you saved over the css
?
You said it's in your root directory? Try an absolute path. Also, you should be using type="text/css"
.
<link type="text/css" rel="stylesheet" href="/jquery.mobile-1.0a4.1.min.css" />
Your CSS link looks fine. Looking over your repo I did notice the images directory the jQM uses to display icons and such is missing. This could be the problem you're looking for.
If you look in the css for .png you will see the missing images.
Here is what some of them look like: http://code.jquery.com/mobile/1.0a4.1/images/icons-18-white.png (middle top)
精彩评论