我面临以下问题:我希望使用ThemeRoller将自定义主题应用到我的视图中。但一旦我使用了它们,界面就会变得一团糟,请看下面的图片:
没有ThemeRoller:

使用ThemeRoller:

使用ThemeRoller,刷新:

我的导航菜单也是这样:

对此:

我已经使用了ThemeRoller,就像他们解释的那样。我使用的是ThemeRoller的正确版本,与jQuery版本1.0.1相匹配。我以正确的顺序导入了该文件:
<link rel="stylesheet" href="~/Themes/CustomTheme2.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile.structure-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>如果你错过任何信息,请留下评论,我会提供他们!
提前感谢!
EDIT_1:
来自ThemeRoller的说明:
要使用您的主题,请在文件之前将其添加到页面的顶部,如:
<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile page</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/themes/my-custom-theme.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile.structure-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
</head>发布于 2014-01-13 09:43:56
据我所知,为所有元素创建/应用样式的js将呈现两次。试着在控制台上检查一下。
https://stackoverflow.com/questions/21086511
复制相似问题