0

I was wondering if it is possible to use OnsenUI CSS Components (http://components.onsenui.io) within a jQuery mobile web app.

I am only trying to use the CSS Components, not the entire OnsenUI, for this project, and so far the CSS styles seem to be conflicting.

Is there a simple way to reduce conflicts? Or is the best way to rename all Onsen CSS Classes to make sure they are individual?

Thanks.

4

1 に答える 1

1

完全な証明ではありませんが、 data-role="none" を使用して jQM に要素をそのままにしておくように指示できます。これにより、OnsenUI は競合することなく CSS を適用できます。

<label class="switch">
     <input type="checkbox" class="switch__input" data-role="none" />
     <div class="switch__toggle"></div>
</label>

デモ

于 2014-08-08T16:22:12.107 に答える