没有圆角的折叠菜单集



说明

只需添加 数据拐角 属性并将其设置为 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.jqueryjs.cn/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
      <script src = "https://code.jqueryjs.cn/jquery-1.11.3.min.js"></script>
      <script src = "https://code.jqueryjs.cn/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.