jquery.mobile 手機滾動

<!-- <!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<meta name="viewport"

content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<link rel="stylesheet"

href="../../../ui/jquery.mobile-1.4.5/jquery.mobile-1.4.5.css">

<script src="../../../ui/jquery.mobile-1.4.5/js/jquery.js"></script>

<script src="../../../ui/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js"></script>

</head>

<body> -->

<div data-role="page" id="mytabs"

style="background-image: url('../../../Image/App/hb_main3.jpg'); background-size: 100% 100%;">

<script type="text/javascript">

if (!$.mobile.data) {

$.mobile.data = {};

}

if (!$.mobile.data.tabNames) {

$.mobile.data.tabNames = [ '健康體檢', '美容抗衰', '口腔健康', '功能醫學', '康復療養' ];

$.mobile.data.clickTab = function(tab) {

var index = $(tab).attr('data-tab-index');

$('#mytabs .fragments').hide();

$('#fragment-' + index).show();

}

$.mobile.data.moveToPrevTab = function() {

var $Navbar = $('#mytabs-navbar');

var index = parseInt($Navbar.attr('data-tab-index'));

if (index > 0) {

$Navbar.find('a').each(

function(i, e) {

var no = index - 1 + i;

$(e).text($.mobile.data.tabNames[no]).attr(

'data-tab-index', no);

}).filter('.ui-btn-active').click();

$Navbar.attr('data-tab-index', --index);

if (index == 0) {

$('#mytabs-prev').css('color', '#ccc');

} else {

$('#mytabs-next').css('color', '#000');

}

}

};

$.mobile.data.moveToNextTab = function() {

var $Navbar = $('#mytabs-navbar');

var index = parseInt($Navbar.attr('data-tab-index'));

if (index < 2) {

$Navbar.find('a').each(

function(i, e) {

var no = index + 1 + i;

$(e).text($.mobile.data.tabNames[no]).attr(

'data-tab-index', no);

}).filter('.ui-btn-active').click();

$Navbar.attr('data-tab-index', ++index);

if (index == 2) {

$('#mytabs-next').css('color', '#ccc');

} else {

$('#mytabs-prev').css('color', '#000');

}

}

};

}

</script>

<div data-role="header" data-position="fixed" data-theme="b"

style="overflow: hidden; background-color: #333333;">

<h1>健康中心</h1>

<a href="../../app/main.html" data-icon="back" data-iconpos="notext">Back</a>

<a href="#opt-panel" data-icon="gear" data-iconpos="notext"

style="display: none;">Options</a>

</div>

<div class="ui-content" role="main">

<div

style="margin: -16px -16px 0 -16px; padding: 0 31px; position: relative;">

<div

style="position: absolute; top: 0; left: 0; width: 32px; height: 100%;">

<a id="mytabs-prev" href="#" class="ui-btn ui-mini"

style="margin: 0; color: #ccc; background-color: #2A670D;"

onclick="$.mobile.data.moveToPrevTab();">&lt;</a>

</div>

<div id="mytabs-navbar" data-role="navbar" data-tab-index="0">

<ul>

<li><a href="#" data-tab-index="0" class="ui-btn-active"

onclick="$.mobile.data.clickTab(this);">健康體檢</a></li>

<li><a href="#" data-tab-index="1"

onclick="$.mobile.data.clickTab(this);">美容抗衰</a></li>

<li><a href="#" data-tab-index="2"

onclick="$.mobile.data.clickTab(this);">口腔健康</a></li>

</ul>

</div>

<div

style="position: absolute; top: 0; right: 0; background-color: red; width: 32px;; height: 100%;">

<a id="mytabs-next" href="#" class="ui-btn ui-mini"

style="margin: 0; background-color: #2A670D;"

onclick="$.mobile.data.moveToNextTab();">&gt;</a>

</div>

</div>

<div id="fragment-0" class="fragments">

<div style="margin-top: 20px;">

<ul data-role="listview" class="ul">

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;"

href="../health/detail.html"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div> 體檢套餐</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>健康之旅</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>健康管理計劃</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>基因檢測</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>中醫檢測</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>體能檢測</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>心裏檢測</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>營養評估</a></li>

</ul>

</div>

</div>

<div id="fragment-1" class="fragments" style="display: none;">

<div style="margin-top: 20px;">

<ul data-role="listview" class="ul">

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>光子嫩膚</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>冰點脫毛</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>果酸換膚</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>玻糖酸</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>保妥適</a></li>

</ul>

</div>

</div>

<div id="fragment-2" class="fragments" style="display: none;">

<div style="margin-top: 20px;">

<ul data-role="listview" class="ul">

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>口腔種植</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>超薄貼面</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>無痛潔牙</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>牙齒矯正</a></li>

</ul>

</div>

</div>

<div id="fragment-3" class="fragments" style="display: none;">

<div style="margin-top: 20px;">

<ul data-role="listview" class="ul">

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>功能醫學</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>荷爾蒙療法</a>

</ul>

</div>

</div>

<div id="fragment-4" class="fragments" style="display: none;">

<div style="margin-top: 20px;">

<ul data-role="listview" class="ul">

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>運動康復</a></li>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>度假療養</a>

<li class="li"><a

style="padding-left: 30px; background-color: #97E88F;" href="#"><div

style="float: left; width: 60px;">

<img src="../../../Image/App/hb_20.jpg"

style="max-width: 100%; height: 30px; margin: auto;">

</div>康復套餐</a>

</ul>

</div>

</div>

</div>

</div>

<!-- </body></html> -->


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章