簡體   English   中英

使用引導程序向 Flask 應用程序添加了奇怪的附加按鈕

[英]Strange additional button added to Flask app with bootstrap

嗨,我正在制作一個 Flask 應用程序,當我注意到一個按鈕被添加到我的頁面而它不在 html 模板中時,我仍然處於開始階段。

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>my page </title>
    
        <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet"> 
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
      <link rel="stylesheet" href="{{ url_for('static', filename='styles/style.css') }}">
    
    
    </head>
    <body>
        
      <header> 
          <h1>my page</h1>
      </header>
        <div class="firstrow">
          <a class="btn btn-primary btn-lg" href="#" role="button"><i class="material-icons">schedule</i></a>
          <a class="btn btn-primary btn-lg" href="#" role="button">contact</a>
          <a class="btn btn-primary btn-lg" href="#" role="button">services</a>
          <a class="btn btn-primary btn-lg" href="#" role="button">team</a>
          
        </div>
        <div class="secondrow">
          <a class="btn btn-primary btn-lg" href="#" role="button" id=aparatura>aparatura</а>
          <a class="btn btn-primary btn-lg" href="#" role="button" id=principles>principles</а>
          <a class="btn btn-primary btn-lg" href="#" role="button" id=safety>safety</а>
        </div>
              
    </body>
    </html>

如您所見,第二行 div 之后沒有任何內容,但加載時會在左下角出現一個奇怪的額外按鈕。 這可能不是緩存問題,因為當我更改 html 內容並重新加載時,對頁面進行了更改,但按鈕仍然存在。 CSS 應用於所有.btn類,但在第二行 div 之后沒有標簽或任何東西。

這是引導程序問題嗎? 這是什么?

編輯:我發現用 "" 標簽替換最后 3 個 "" 標簽不會導致這種行為有人可以解釋嗎?

將此替換為第二行

    <a class="btn btn-primary btn-lg" href="#" role="button" id="aparatura">aparatura</a>
    <a class="btn btn-primary btn-lg" href="#" role="button" id="principles">principles</a>
    <a class="btn btn-primary btn-lg" href="#" role="button" id="safety">safety</a>

或重寫第二行</a>結束標記

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM