Advertisement
metalx1000

Materialize CSS Example

Apr 10th, 2017
824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.46 KB | None | 0 0
  1.   <!DOCTYPE html>
  2.   <html>
  3.     <head>
  4.       <!--Import Google Icon Font-->
  5.       <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  6.       <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  7.       <!-- Compiled and minified CSS -->
  8.       <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/css/materialize.min.css">
  9.  
  10.       <!-- Compiled and minified JavaScript -->
  11.       <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js"></script>
  12.                
  13.       <!--Let browser know website is optimized for mobile-->
  14.       <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  15.       <script>
  16.         $(document).ready(function(){
  17.           $('.carousel').carousel();
  18.           $(".button-collapse").sideNav();
  19.          
  20.           //Popup Message
  21.           Materialize.toast('I am a toast!', 3000, 'rounded');
  22.  
  23.           //init modal
  24.           $('.modal').modal();
  25.         });
  26.       </script>
  27.     </head>
  28.  
  29.     <body>
  30. <!--Nav Bar-->
  31.       <nav>
  32.         <div class="nav-wrapper">
  33.           <a href="#!" class="brand-logo">Logo</a>
  34.           <a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons">menu</i></a>
  35.           <ul class="right hide-on-med-and-down">
  36.             <li><a href="sass.html">Sass</a></li>
  37.             <li><a href="badges.html">Components</a></li>
  38.             <li><a href="collapsible.html">Javascript</a></li>
  39.             <li><a href="mobile.html">Mobile</a></li>
  40.           </ul>
  41.           <ul class="side-nav" id="mobile-demo">
  42.             <li><a href="sass.html">Sass</a></li>
  43.             <li><a href="badges.html">Components</a></li>
  44.             <li><a href="collapsible.html">Javascript</a></li>
  45.             <li><a href="mobile.html">Mobile</a></li>
  46.           </ul>
  47.         </div>
  48.       </nav>
  49. <!--Carousel-->
  50.       <div class="carousel">
  51.         <a class="carousel-item" target="_blank" href="https://www.youtube.com/watch?v=VgNIkGzxGAU"><img src="https://i3.ytimg.com/vi/VgNIkGzxGAU/hqdefault.jpg"></a>
  52.         <a class="carousel-item" href="#two!"><img src="http://lorempixel.com/250/250/nature/2"></a>
  53.         <a class="carousel-item" href="#three!"><img src="http://lorempixel.com/250/250/nature/3"></a>
  54.         <a class="carousel-item" href="#four!"><img src="http://lorempixel.com/250/250/nature/4"></a>
  55.         <a class="carousel-item" href="#five!"><img src="http://lorempixel.com/250/250/nature/5"></a>
  56.       </div>
  57.  
  58. <!--tooltip button-->
  59.       <a class="btn tooltipped" data-position="top" data-delay="50" data-tooltip="I am tooltip">Hover me!</a>
  60.  
  61.   <!-- Modal Trigger -->
  62.   <a class="waves-effect waves-light btn" href="#modal1">Modal</a>
  63.  
  64.   <!-- Modal Structure -->
  65.   <div id="modal1" class="modal bottom-sheet">
  66.     <div class="modal-content">
  67.       <h4>Modal Header</h4>
  68.       <p>A bunch of text</p>
  69.     </div>
  70.     <div class="modal-footer">
  71.       <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
  72.     </div>
  73.   </div>
  74.          
  75.  
  76.   <!-- Element Showed -->
  77.   <a id="menu" class="waves-effect waves-light btn btn-floating" ><i class="material-icons">menu</i></a>
  78.  
  79.   <!-- Tap Target Structure -->
  80.   <div class="tap-target" data-activates="menu">
  81.     <div class="tap-target-content">
  82.       <h5>Title</h5>
  83.       <p>A bunch of text</p>
  84.     </div>
  85.   </div>
  86.            
  87.     </body>
  88.   </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement