1

是什么意思

.ui-"something"

用于 jquery Mobile 的 CSS 文件。它的目的是什么。示例:当我使用 dreamweaver(mobile) 创建新文件时。我得到一个预定义的结构。jquery的css文件的一些语句是:

s.ui-mobile,.ui-mobile body{height:100%background:url(images/home_main.jpg);}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border:0}.ui-mobile-viewport{margin:0;overflow-x:visible;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body.ui-mobile-viewport,div.ui-mobile-viewport{overflow-x:hidden}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.ui-page{outline:0}@media screen and (orientation:portrait){.ui-mobile,.ui-mobile .ui-page{min-height:420px}}@media screen and (orientation:landscape){.ui-mobile,.ui-mobile .ui-page{min-height:300px}

所以基本上是做什么的。.ui-page,.ui-mobile,.ui-mobile body 意思是。如果我更新一些值或在其中插入新的 css 属性会发生什么,我将在哪里看到更改。

4

2 回答 2

0

jQuery mobile framework takes the "write less, do more" mantra to the next level: Instead of writing unique apps for each mobile device or OS, the jQuery mobile framework allows you to design a single highly-branded web site or application that will work on all popular smartphone, tablet, and desktop platforms.

Since you are writing "less" there should be a lot of things going on behind the scenes. Here JQuery Mobile is offering well styled mobile friendly controls. In order to obtain mobile friendly control with simple code for example like this:

<div data-role="fieldcontain">
    <label for="select-choice-1" class="select">Choose shipping method:</label>
    <select name="select-choice-1" id="select-choice-1">
        <option value="standard">Standard: 7 day</option>
        <option value="rush">Rush: 3 days</option>
        <option value="express">Express: next day</option>
        <option value="overnight">Overnight</option>
    </select>
</div>

JQuery Mobile wraps and styles you controls using JQuery and CSS. So when rendered the select tag is wrapped inside <div class="ui-select">. And to answer your question ui-something is just a CSS class.

于 2013-07-21T10:46:39.913 回答
0

这些类旨在创建跨应用程序的视觉一致性,并允许通过 jQuery UI ThemeRoller 对组件进行主题化。

http://api.jqueryui.com/theming/css-framework/

于 2013-07-21T10:36:21.457 回答