揭示更大的屏幕(Reveal on Larger Screens)

优质
小牛编辑
133浏览
2023-12-01

描述 (Description)

使用.reveal-for-medium.reveal-for-large类在大屏幕和中等屏幕上设置左手和右手画布。

例子 (Example)

以下示例演示了在Foundation的reveal on larger screens使用reveal on larger screens -

<!doctype html>
   <head>
      <meta charset = "utf-8" />
      <meta http-equiv = "x-ua-compatible" content = "ie = edge" />
      <meta name = "viewport" content = "width = device-width, initial-scale = 1.0" />
      <title>Off Canvas Reveal on Larger Screens</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
   </head>
   <body>
      <h2>Off-canvas Reveal on Larger Screen Example</h2>
      <div class = "off-canvas-wrapper">
         <div class = "off-canvas-wrapper-inner" data-off-canvas-wrapper>
            <div class = "off-canvas position-left reveal-for-large" id = "off_canvas_left" data-off-canvas></div>
            <div class = "off-canvas-content" data-off-canvas-content>
               Welcome to Foundation
            </div>
            <button type = "button" class = "button" data-toggle = "off_canvas_left">Click Here</button>
         </div>
      </div>
      <script>
         $(document).ready(function() {
            $(document).foundation();
         })
      </script>
   </body>
</html>