我有一个简单的应用程序,在iPhone(iOS 5)上运行,但是返回按钮和标题文本的大小和位置不正确。标题文本最终会在按钮下面。我猜想jQuery Mobile不能按预期的方式自动调整大小/位置...
我的要求是,标题文本被截断并从返回按钮的右侧开始。标题旁边不会有另一个按钮,所以如果它移到页面的右侧,也没有问题。
我的要求是,标题文本被截断并从返回按钮的右侧开始。标题旁边不会有另一个按钮,所以如果它移到页面的右侧,也没有问题。
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script> </head>
<body>
<div data-role="page">
<div data-role="header">
<a data-icon="arrow-l" data-rel="back">A long button</a>
<h1>A very very very long title</h1>
</div>
<div data-role="content">
<p>Page content goes here.</p>
</div>
<div data-role="footer">
<h4>Page Footer</h4>
</div>
</div>
</body>
</html>
可运行的示例位于:http://jsfiddle.net/5n8WN/
我确实看过这个答案,但是我尝试的东西没有得到我想要的结果。