Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 更改我的jquery移动主题会更改我的css样式_Javascript_Html_Css_Jquery Mobile - Fatal编程技术网

Javascript 更改我的jquery移动主题会更改我的css样式

Javascript 更改我的jquery移动主题会更改我的css样式,javascript,html,css,jquery-mobile,Javascript,Html,Css,Jquery Mobile,我在我的网站上创建了一个可折叠的集合,看起来类似于: <div data-role="collapsible-set" id="result" style="margin: auto; padding-top: 50px; padding-bottom: 20px;"> <div> <h2> <span style="font-size: 16px; font-weight: bold; white-space

我在我的网站上创建了一个可折叠的集合,看起来类似于:

<div data-role="collapsible-set" id="result" style="margin: auto; padding-top: 50px; padding-bottom: 20px;">
     <div>
         <h2>
        <span style="font-size: 16px; font-weight: bold; white-space: pre-wrap;" id="title' + num + '">abc</span><br>
        <span style="font-size: 14px; font-weight: normal;" id="author' + num + '"></span>
        <div style="font-weight: normal;">
            <span style="font-style:italic; font-size: 13px;" id="journal' + num + '"></span>
        </div>
        </h2>
        <div style="font-size: 14px;">
            more info
        </div>
     </div>       
</div>
这是设置样式之前我的列表项的外观:

下面是我添加主题后的效果:

如您所见,现在每行之间的间距相当大。我曾尝试使用填充来更改css,但没有任何改变。谁能给我指一下正确的方向吗

这是一把前后小提琴:


应用主题会改变HTML元素的外观,如下所示

div.setAttribute(“数据主题”、“c”)

数据主题可能有自己的CSS类,这会影响您的网页设计

您是否使用过任何CSS框架,比如BootStrap? 尝试将此主题元素添加到您希望更改设计的确切div中

您需要使用升级
theme classic.css

  • 转到并向下滚动至“旧版本”
  • 在Version1.3.2-CSS open下,复制其“内容”
  • 转到,从顶部工具栏单击“导入或升级”。一个新窗口将打开
  • 在该窗口上,粘贴1.3.2 CSS样式。从选择菜单中,选择“升级到1.4.5版”,然后单击“导入”按钮
  • 查看复制的主题,如果需要,请进行更改。完成后,单击顶部工具栏上的“下载”,为主题指定一个自定义名称并下载升级的经典主题
  • 按以下顺序放置新主题和其他依赖项

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

  • 用小提琴演奏。这将是很容易的,因为我已经增加了两个小提琴的。感谢您将
    .ui btn
    行高值从
    1.3
    更改为
    0.5
    我没有使用任何css框架。我添加了一些链接来进一步解释这些例子。谢谢你说每个主题可能都有自己的css类,这会造成问题。有什么方法可以覆盖它吗?我看不到你的div的蓝色标题版本,这是在你的fiddlecheck链接中添加主题后发生的。。。在这里,您可以学习如何创建自己的数据主题样例。该样例非常适合相应地更改样式。也有非常详细的说明。谢谢
    <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>