Materialize 排版

2018-01-05 11:12 更新

Materialize使用Roboto 2.0作為標(biāo)準(zhǔn)字體。它可以覆蓋使用以下CSS樣式:

html {
   font-family: GillSans, Calibri, Trebuchet, sans-serif;
}

以下是標(biāo)題,塊引用和自由流但響應(yīng)文本的示例。

例子

materialize_typography.html

<!DOCTYPE html>
<html>
   <head>
      <title>The Materialize Typography Example</title>
	  <meta name="viewport" content="width=device-width, initial-scale=1">      
	  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
	  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
      <script type="text/javascript" src="/attachments/tuploads/materialize/jquery-2.1.1.min.js"></script>           
      <script src="/attachments/tuploads/materialize/materialize.min.js"></script> 
   </head>
   <body class="container"> 
      <h2>Typography Demo</h2>
	  <hr/>
	  <h3>Headings</h3>
      <div class="card-panel">
         <h1>Heading 1</h1>
         <h2>Heading 2</h2>
         <h3>Heading 3</h3>
         <h4>Heading 4</h4>
         <h5>Heading 5</h5>
         <h6>Heading 6</h6>
      </div>
	  <h3>Block Quotes</h3>
      <div class="card-panel">
         <blockquote>
          The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.
         </blockquote>
      </div>
	  <h3>Responsive free-flow text</h3>
      <div class="card-panel">
          <p class="flow-text">
          The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.
         </p>
      </div>		  
   </body>
</html>

結(jié)果

驗(yàn)證結(jié)果,如下圖所示。


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號