数据图标显示不正确

时间:2015-12-06 06:15:29

标签: jquery-mobile

我是jquery mobile的新手。我正在执行附加的代码。我有锚标签,其角色是按钮,附加数据图标为箭头-r,但它没有按照我的预期正确显示。请帮助。 箭头图标显示如下 Arrow icon is showing like this

但我希望这样表现出来 我希望像这样展示

enter image description here

我缺少CDN吗?请帮忙。

<!DOCTYPE html>
<!--
    Copyright (c) 2012-2014 Adobe Systems Incorporated. All rights reserved.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
 

   <html>
        <head>
            <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.css">
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>


            <link rel="stylesheet" type="text/css" href="css/index.css" />
            
            <title>Hello World</title>
            <style type="text/css">
             .custom-btn{
                width:200px !important;;
                height: 50px !important;;
             }
             #btn1{
                height: 8px;
             }
            </style>
        </head>
        <body>
     <div id="home" data-role="page">
          <div data-role="header">
            <h1 class="head">home</h1>
            <a href="blog.html" data-role="button" data-icon="home" style="height:8px;width:50px">Blog</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" style="height:8px;width:50px">Home</a>
          </div>
       <p>Welcome to the view source app</p>
       <!-- <div data-role="controlgroup"> -->
       <a href="blog.html" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r">Blog</a>
       <a href="#videos" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r">Videos</a>
    <a href="#Photos" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r">Photos</a>
    <a href="#Tweets" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r">Tweets</a><!-- 
    </div> --> 
     </div>
     <div  data-role="page" id="videos" data-title="View Source:Videos">
    <div data-role="header">
      <h1>Videos</h1>
      <a href="#home" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r" style="height:8px;width:50px">Videos</a>
    </div>
    <p>Videos page</p>
    <a href="blog.html" data-transition="pop">Home</a>
    </div>
    <div id="Photos" data-role="page" data-title="View Source:Photos">
    <div data-role="header">
      <h1>Photos</h1>
     <a href="#home" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r" style="height:8px;width:75px">Photos</a>
    </div>
    <p>Photos page</p>
    <a href="blog.html" data-transition="pop">Home</a>
    </div>
    <div id="Tweets" data-role="page" data-title="View Source:Blog">
    <div data-role="header">
      <h1>Tweets</h1>
      <a href="#home" data-transition="flip" data-role="button" data-mini="true" data-icon="arrow-r" style="height:8px;width:50px">Home</a>
    </div>
    <p>Tweets</p>
    <a href="blog.html" data-transition="pop">Home</a>
    </div> 
    <!-- Start of first page: #one -->
        </body>
    </html>

1 个答案:

答案 0 :(得分:1)

将您的数据图标属性更改为carat-r

<a href="index.html" data-role="button" data-icon="carat-r" style="height:8px;width:50px">Home</a>

请查看图标列表:https://api.jquerymobile.com/icons/

你已经连接了两次jQuery Mobile JS库和样式表。尝试同时只使用其中一个。