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