jquery - 数据图标不显示

标签 jquery html css jquery-mobile

根据 “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/

相关文章:

jQuery on event 在其他页面上查找元素

javascript - 调用焦点时按钮和跨度有什么区别?

javascript - 使浏览器自动固定布局的最佳实践

jquery - 如何让元素相互淡出?

javascript - 如何将类添加到下两个元素并从当前两个元素中删除?

javascript - array_key_exists() 期望参数 2 为数组,给定 null

javascript - 从右到左的幻灯片

javascript - HTML 表单 onSubmit 属性与 location.href 存在问题

html - 使用 css 在 % 处居中文本

html - 两个静态 DIV 之间的动态大小的文本框