jQuery why some of my icons start looking incorrect

前端 未结 2 1804
囚心锁ツ
囚心锁ツ 2020-12-11 17:22

I use jQuery mobile on my app, Everything was ok but I just noticed that these two items below does not look correct anymore.

First one is a selection and there use

相关标签:
2条回答
  • 2020-12-11 17:36

    You are missing the reference to the images files. You need to get the images into your project. When you download the library as ZIP file you can find the folder which contains the images.

    Else use CDN as below

    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
    
    0 讨论(0)
  • 2020-12-11 17:48

    Mayu Mayooresan answer is correct for using CDN-Hosted jQuery-Mobile.

    If you want to Host it locally, download jQuery Mobile, extract the files to folder /js/. The structure should look like this:

    HTML files, directly in root folder

    webapp/Index.html

    Scripts under root/JS folder

    webapp/js/jquery.mobile-1.3.0.min.css

    webapp/js/jquery-1.8.2.min.js

    webapp/js/jquery.mobile-1.3.0.min.js

    Images under root/JS/images/ folder

    webapp/js/images/ajax-loader.gif

    webapp/js/images/icons-18-black.png

    webapp/js/images/icons-36-black.png

    webapp/js/images/icons-18-white.png

    webapp/js/images/icons-36-white.png

    In your HTML file:

    <head>
     <link rel="stylesheet" href="js/jquery.mobile-1.3.0.min.css" />
     <script src="js/jquery-1.8.2.min.js"></script>
     <script src="js/jquery.mobile-1.3.0.min.js"></script>
    </head>
    
    0 讨论(0)
提交回复
热议问题