工作示例:http: //jsfiddle.net/Gajotres/PMrDn/39/
HTML:
<div data-role="navbar" data-iconpos="left" class="custom-navbar">
<ul>
<li><a href="" data-prefetch="true" rel="external" data-icon="fbicon"> Facebook</a></li>
<li><a href="" data-prefetch="true" rel="external" data-icon="yticon">YouTube</a></li>
<li><a href="" id="my_activitypage" data-prefetch="true" data-icon="maicon" class="ui-btn-active ui-state-persist">My Activity</a></li>
</ul>
</div>
CSS:
.custom-navbar ul li a {
background: #67497a; /* Old browsers */
background: linear-gradient( #67497a,#946ab1 ) repeat scroll 0 0 #67497a !important;
background: -moz-linear-gradient( #67497a,#946ab1 ) repeat scroll 0 0 #67497a !important; /* FF3.6+ */
background: -webkit-linear-gradient( #67497a,#946ab1 ) repeat scroll 0 0 #67497a !important; /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient( #67497a,#946ab1 ) repeat scroll 0 0 #67497a !important; /* Opera 11.10+ */
background: -ms-linear-gradient( #67497a,#946ab1 ) repeat scroll 0 0 #67497a !important; /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#67497a', endColorstr='#946ab1',GradientType=0 ); /* IE6-9 */
}
.custom-navbar ul li a.ui-btn-active {
background: linear-gradient(#5393C5, #6FACD5) repeat scroll 0 0 #5393C5 !important;
background: #67497a; /* Old browsers */
background: linear-gradient(#5393C5, #6FACD5) repeat scroll 0 0 #5393C5 !important; /* FF3.6+ */
background: -webkit-linear-gradient(#5393C5, #6FACD5) repeat scroll 0 0 #5393C5 !important; /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(#5393C5, #6FACD5) repeat scroll 0 0 #5393C5 !important; /* Opera 11.10+ */
background: -ms-linear-gradient(#5393C5, #6FACD5) repeat scroll 0 0 #5393C5 !important; /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5393C5', endColorstr='#6FACD5',GradientType=0 ); /* IE6-9 */
}