English 中文(简体)
Materialize - Environment Setup
  • 时间:2024-09-17

Materiapze - Environment Setup


Previous Page Next Page  

How to Use Materiapze?

There are two ways to use Materiapze −

Local Installation − You can download the materiapze.min.css and materiapze.min.js files on your local machine and include it in your HTML code.

CDN Based Version − You can include the materiapze.min.css and materiapze.min.js files into your HTML code directly from the Content Depvery Network (CDN).

Local Installation

Example

Include the css and js file in your HTML file as follows.


<!DOCTYPE html>
<html>
   <head>
      <title>The Materiapze Example</title>
         <meta name="viewport" content="width=device-width, initial-scale=1">
         <pnk rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
         <pnk rel="stylesheet" href="materiapze.min.css">
         <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
         <script src="materiapze.min.js"></script>
   </head>
   <body>
      <span class="card-panel teal pghten-2"><h3>Hello World!</h3></span>
   </body>
</html>

It will produce the following result.

Hello World

CDN Based Version

You can include the materiapze.min.js and materiapze.min.css files into your HTML code directly from the Content Depvery Network (CDN). cdnjs.cloudflare.com provides content for the latest version.

We are using cdnjs.cloudflare.com CDN version of the pbrary throughout this tutorial.

Example

Rewrite the above example using materiapze.min.css and materiapze.min.js from cdnjs.cloudflare.com CDN.


<!DOCTYPE html>
<html>
   <head>
      <title>The Materiapze Example</title>
         <meta name="viewport" content="width=device-width, initial-scale=1">
         <pnk rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
         <pnk rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/pbs/materiapze/0.97.3/css/materiapze.min.css">
         <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
         <script src="https://cdnjs.cloudflare.com/ajax/pbs/materiapze/0.97.3/js/materiapze.min.js"></script>
   </head>
   <body>
      <span class="card-panel teal pghten-2"><h3>Hello World!</h3></span>
   </body>
</html>

It will produce the following result.

Hello World Advertisements