1

TriggerIOテンプレートファイルに表示されるdiv'data-role'オプションの目的は何ですか?これを無視して、HTML5で通常のWebサイトを構築するかのようにアプリを構築できると思いますか?または、CSSセレクターなどを開始するために別のタグオプションを使用する必要がありますか?TriggerIOアプリと、通常のHTML5アプリの作成方法との実際の違いについてはあまり情報がないようです。

画像とテキストを表示し、次のページにスワイプできる童話アプリを作成しています)。画像やテキストを読み込むためにキャンバスを使用する必要がありますか、それとも古い学校のimgタグやその他のマークアップを使用するのが最善ですか?

4

1 に答える 1

3

The example app that you get when you create a new app using the TriggerToolkit uses jQuery mobile. The data-role attributes are used by jQuery mobile:

In the body, a div with a data-role of page is the wrapper used to delineate a page, and the header bar (data-role="header") and content region (data-role="content") are added inside to create a basic page (these are both optional). These data- attributes are HTML5 attributes used throughout jQuery Mobile to transform basic markup into an enhanced and styled widget.

From: http://jquerymobile.com/demos/1.2.0/docs/about/getting-started.html

You can delete all this and use whatever markup, stylesheets and JavaScript you would usually when making a website. I'd definitely recommend using <img> and regular text rather than doing everything in a <canvas>. My advice would be to "try it and see", treating the development as you would a mobile website, but with assets stored locally and the ability to leverage forge APIs.

于 2012-10-23T10:16:38.807 に答える