根据 “http://jquerymobile.com/demos/1.2.1/docs/buttons/buttons-icons.html” 应该是写下面代码的情况...
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<link href="Content/jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css" />
<a data-role="button" href="#page1" data-icon="arrow-u" data-iconpos="left">
Button
</a>
</body>
</html>
但是,当我在本地构建它并部署到服务器上时,它没有显示图标。 有人可以帮忙吗?
最佳答案
您的标记应如下所示。
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
</head>
然后是 jQuery Mobile 代码
<div data-role='page'>
<a href='#' data-role='button' data-icon='arrow-u' data-iconpos='left'>Button</a>
</div>
引用资料:
关于jquery - 数据图标不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16940980/