2012-11-17 37 views
1

我已经创建了一个简单的移动网页,我不是没有为什么,但我创建的按钮没有像这个link这样的程式化。下面是代码:jquery mobile不实现样式

<!DOCTYPE HTML> 
<html> 
<head> 
    <meta name="viewport" content = "width=device-width , user-scalable=no"> 
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 

    <link type="text/css" href="jquery.mobile/jquery.mobile-1.1.0.css"/> 
    <link type="text/css" href="themes/theme.min.css"/> 
    <link type="text/css" href="CSS/main.css"/> 

    <script type="text/javascript" src="cordova/cordova-2.2.0.js"></script> 
    <script type="text/javascript" src="jquery/jquery-1.8.3.js"></script> 
    <script type="text/javascript" src="jquery.mobile/jquery.mobile-1.1.0.js"></script> 

    <title>page</title> 
</head> 

<body> 
    <div data-role="page"> 
     <div data-role="content"> 
      <a href="index.html" data-role="button" data-icon="delete">Delete</a> 
     </div> 
    </div> 
</body> 

</html> 

我哪里错了? 在此先感谢!

回答

1

确保你的本地库可以和路径是正确的...
see working example有最新的库

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>Test</title> 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> 
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> 
    <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> 
</head> 

<body> 
    <div data-role="page"> 
     <div data-role="content"> 
      <a href="index.html" data-role="button" data-icon="delete">Delete</a> 
     </div> 
    </div> 
</body> 
</html> 
1

我认为,问题是你的样式表的链接。您需要包含rel="stylesheet"而不是设置type

E.g.

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css"/>

相关问题