changing my jquery mobile theme changes my css styling

前端 未结 2 862
余生分开走
余生分开走 2021-01-15 09:00

I have a collapsible set that I create on my website which looks similar to this:

相关标签:
2条回答
  • 2021-01-15 09:29

    You need to upgrade theme-classic.css using jQuery Mobile ThemeRoller.

    1. Go to download page and scroll down to "Legacy versions"
    2. Under version 1.3.2 - CSS open Uncompressed with Default theme: jquery.mobile-1.3.2.css, copy its' content.
    3. Go to jQuery Mobile ThemeRoller, from top toolbar, click "Import or upgrade". A new window will open
    4. On that window, paste 1.3.2 CSS styles. From selectmenu, select "Upgrade to version 1.4.5" and then click "Import" button
    5. Review copied themes, do changes if you want. Once done, click "Download" from top toolbar, give your theme a custom name and download upgraded classic themes.
    6. Place new theme and other dependencies in the following order

      <head>
        <link rel="stylesheet" href="css/themes/my-custom-theme.css" />
        <link rel="stylesheet" href="css/themes/jquery.mobile.icons.min.css" />
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css" /> 
        <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 
        <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
      </head> 
      

    Demo

    0 讨论(0)
  • 2021-01-15 09:29

    Applying a theme changes the look and feel of HTML elements as here

    div.setAttribute("data-theme", "c");

    data-theme might be having a CSS class of its own which is effecting your webpage design

    Are you using any CSS framework like BootStrap? Try adding this theme element to the exact div where you wish a design change

    0 讨论(0)
提交回复
热议问题