下拉链接在导航栏中无效|引导

时间:2017-09-14 14:06:27

标签: html twitter-bootstrap navigationbar

我无法点击导航栏中提供的下拉选项。我正在使用bootstrap类来创建导航菜单。尝试了一些谷歌已经存在的例子,但仍未取得成功。

    $data['pose']['latLngPair']['latitude']=$lat+0;
    $data['pose']['latLngPair']['longitude']=$lon+0;
    $data['pose']['heading']=$heading+0;
    $data['pose']['level']['number']=$level+0;
    $data['pose']['level']['name']='L'.($level+0).'';
    $data_string = json_encode($data);  

    $ch = curl_init('https://streetviewpublish.googleapis.com/v1/photo/'.$photo_id.'?key='.$_GOOGLE_API['api_key'].'&updateMask=pose.latLngPair,pose.heading,pose.level');                                                                      
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'authorization: Bearer '.$_GOOGLE_API['access_token'],
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($data_string))                                                                       
    );                                                                                                                                                                                                                                   
    $json_response=curl_exec($ch);
    curl_close ($ch);

如果我做错了,请纠正我。

2 个答案:

答案 0 :(得分:0)

    <div class="btn-group">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Action <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
    <li><a href="#">Action</a></li>
    <li><a href="#">Another action</a></li>
    <li><a href="#">Something else here</a></li>
    <li role="separator" class="divider"></li>
    <li><a href="#">Separated link</a></li>
  </ul>
</div>

答案 1 :(得分:0)

请在标签

上方添加以下bootstrap js链接

&#13;
&#13;
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Template</title>

    <!-- Bootstrap core CSS --><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
    <!-- Custom styles for this template -->
  </head>

  <div class="navbar navbar-default navbar-fixed-top" style="background-color: #7910C6">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle Navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="">Demo AUT</a>
    </div>
    <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav navbar-right">
            <li class="act"><a href="HomePage.aspx">Home</a></li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Frames & Windows<b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="Frames.aspx">Frames</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="Windows.aspx">Windows</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>


  <body>
<h1 class="text-success">  testing</h1>
			<!-- ahiya bootstrap na code lakhjo -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
   <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
  </body>
</html>
&#13;
&#13;
&#13;