沒有圓角的摺疊選單集



說明

只需新增 資料拐角 屬性並將其設定為 false,即可獲得一個沒有圓角樣式的嵌入式摺疊選單集。

示例

以下示例展示了在 jQuery Mobile 中使用沒有圓角的摺疊選單集

<!DOCTYPE html>
<html>
   <head>
      <title>Collapsible set without rounded corners</title>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <link rel = "stylesheet" href = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
      <script src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
      <script src = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
   </head>

   <body>
      <div data-role = "collapsibleset" data-corners = "false" data-theme = "a" 
         data-content-theme = "a">
         <div data-role = "collapsible">
            <h3>Heading 1</h3>
            <p>This is collapsible content</p>
         </div>
         
         <div data-role = "collapsible">
            <h3>Heading 2</h3>
            <p>This is collapsible content</p>
         </div>
         
         <div data-role = "collapsible">
            <h3>Heading 3</h3>
            <p>This is collapsible content</p>
         </div>
      </div>
   </body>
</html>

輸出

讓我們進行以下步驟,看看上面的程式碼是如何工作的:

  • 將上面的 html 程式碼另存為 collapsible_set_corners.html 檔案,並將其放在你的伺服器根資料夾中。

  • 用 https:///collapsible_set_corners.html 開啟此 HTML 檔案,然後將顯示以下輸出。

jquery_mobile_widgets.htm
廣告
© . All rights reserved.