剑道ui手机设置默认主题为平ui

时间:2013-09-03 20:38:57

标签: html5 css3 kendo-ui kendo-mobile

我刚刚开始使用kendo ui,并在下面运行一个非常基本的示例。

它目前显示为ios但我想一直将它设置为平面ui主题。我无法在演示或文档中看到任何说明如何执行此操作的内容。

有人可以告诉我如何将默认主题更改为平面设计吗?

<!doctype html>
<html>
<head>

<!-- Kendo UI Mobile CSS -->
<link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />

<!-- jQuery JavaScript -->
<script src="js/jquery.min.js"></script>
<!-- Kendo UI Mobile combined JavaScript -->
<script src="js/kendo.mobile.min.js"></script>
    <title>Kendo UI Examples</title>
</head>
<body>

<!-- Kendo Mobile View -->
<div data-role="view" data-title="test" id="index">
    <!--Kendo Mobile Header -->
    <header data-role="header">
        <!--Kendo Mobile NavBar widget -->
        <div data-role="navbar">
            <span data-role="view-title"></span>
        </div>
    </header>
    <!--Kendo Mobile ListView widget -->
    <ul data-role="listview">
      <li>Item 1</li>
      <li>Item 2</li>
    </ul>
    <!--Kendo Mobile Footer -->
    <footer data-role="footer">
        <!-- Kendo Mobile TabStrip widget -->
        <div data-role="tabstrip">
            <a data-icon="home" href="#index">Home</a>
            <a data-icon="settings" href="#settings">Settings</a>
        </div>
    </footer>
</div>
<script>
// Initialize a new Kendo Mobile Application
var app = new kendo.mobile.Application();
</script>

</body>
</html>

2 个答案:

答案 0 :(得分:14)

您可以在应用声明中覆盖设备/皮肤。

var app = new kendo.mobile.Application($(document.body), { skin: 'flat' });

或者您可以强制所有人使用Windows Phone外观界面

var app = new kendo.mobile.Application($(document.body), { platform: 'wp8' });

见文件...... http://docs.kendoui.com/api/mobile/application#configuration-platform

答案 1 :(得分:-3)

您需要在加载页面上添加所选样式的选择。

<link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />
<link href="styles/kendo.mobile.flat.min.css" rel="stylesheet" />