materialize_使用Materialize快速介紹材料設計

materialize

什么是材料設計? (What is Material Design?)

Material Design is a design language created by Google. According to material.io, Material Design aims to combine:

Material Design是Google創建的一種設計語言。 根據material.io ,Material Design旨在結合:

…classic principles of good design with the innovation and possibility of technology and science. It aims to develop a single underlying system that allows for a unified experience across platforms and device sizes. Mobile precepts are fundamental, but touch, voice, mouse, and keyboard are all ?rst-class input methods.
…具有創新性和技術與科學可能性的優秀設計經典原則。 它旨在開發一個單一的基礎系統,以實現跨平臺和設備尺寸的統一體驗。 移動戒律是最基本的,但是觸摸,語音,鼠標和鍵盤都是一流的輸入法。

為什么要使用Material Design? (Why use Material Design?)

Material Design provides a seamless user experience across all devices. Responsive transitions and animation, along with padding and depth effects such as shadows and lightning, make it feel elegant and user-friendly. Google uses Material Design on almost all its apps (like Keep and Calendar).

Material Design在所有設備上提供無縫的用戶體驗。 響應式過渡和動畫以及諸如陰影和閃電之類的填充和深度效果,使其感覺優雅且用戶友好。 Google幾乎在其所有應用程序(例如Keep和Calendar)上都使用Material Design。

如何在Web應用程序中使用Material Design? (How can you use Material Design in your web apps?)

Materialize is a responsive front-end component library similar to Bootstrap. It offers everything that Bootstrap has to offer, but the difference is that Materialize follows material design principles. Here’s an example template.

Materialize是一個類似于Bootstrap的響應式前端組件庫。 它提供了Bootstrap必須提供的所有內容,但不同之處在于Materialize遵循材料設計原則。 這是一個示例模板。

這是Materialize提供的功能列表: (Here’s a list of features that Materialize offers:)

  • Grid

  • Tables

    桌子
  • Badges, buttons, breadcrumbs

    徽章,紐扣,面包屑
  • Cards, chips, collections

    卡,籌碼,收藏
  • Footer, forms

    頁腳,表格
  • Navbar

    導航欄
  • And a lot more!

    還有更多!

如何開始 (How to get started)

Unlike Bootstrap, Materialize does not require popper.js. It only requires jQuery. This is all you need to get started. Add this to your HTML and you’ll be good to go!

與Bootstrap不同,Materialize不需要popper.js。 它只需要jQuery。 這就是您開始所需要的。 將此添加到您HTML中,您將一路順風!

<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<!--Compiled and minifed jQuery -->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>

色彩 (Colors)

Using Materialize, you can change the color of any HTML element by simply giving it a class name of the color you want. For example, if you want to give your paragraph tag the color red, you do the following:

使用Materialize,只需給它提供所需顏色的類名,就可以更改任何HTML元素的顏色。 例如,如果要將段落標簽的顏色設置為紅色,請執行以下操作:

<p class=”red”>Lorem Ipsum</p>

Additionally, you can also lighten or darken a color by giving it another class name lighten-1 or darken-1. For example, <h1 class=”blue lighten-1”>Sample Text</h1>. The 1 can be replaced with numbers up to 5 for lighten and up to 4 for darken. Higher numbers would apply lighter or darker shades of the color.

此外,您還可以通過給顏色另一個類名稱lighten-1darken-1使顏色變暗或darken-1 。 例如, <h1 class=”blue lighten-1”>Sample Tex t </ h1>。 1可以用最多5的數字代替變亮,最多4的數字代替。 較高的數字將應用較淺或較深的顏色陰影。

紐扣 (Buttons)

To Materialize a button, just give it the class name btn. You can also add a cool animation to it by giving it another class waves-effect. If you need a larger button, btn-large class can be used. For example:

要實現按鈕,只需為其指定類名稱btn 。 您還可以通過給它另一個類waves-effect為其添加一個很酷的動畫。 如果需要更大的按鈕,則可以使用btn-large類。 例如:

<button class=”btn”>Click
</button> <!-- Materialized button without click animation -->
<button class="btn waves-effect">Click
</button> <!-- Materialized button with click animation -->
<button class="btn-large">Click
</button> <!-- Large Button -->

陰影 (Shadow)

In material design, everything should have a certain z-depth that determines how far raised or close to the page the element is.
在材料設計中,所有內容都應具有一定的z深度,該深度確定元素凸起或靠近頁面的距離。

To apply a shadow-effect to an element, the z-depth-2 class can be used (2 can be replaced with numbers 1–5). For example:

要將陰影效果應用于元素,可以使用z-depth-2類(可以將2替換為數字1-5)。 例如:

<div class="z-depth-2"><!-- Really cool stuff --></div>

結論 (Conclusion)

I’ve only scratched the surface here. There is a lot more available in Materialize (like transitions, cards, carousel, and modals). You can learn how to use all the components from the docs. Class names are very simple and the grid is really helpful to create responsive columns quickly. I wish you good luck!

我只在這里刮過表面。 在Materialize中有很多可用的功能(例如過渡,卡,轉盤和模態)。 您可以從docs了解如何使用所有組件。 類名非常簡單,網格對于快速創建響應列非常有幫助。 祝你好運!

翻譯自: https://www.freecodecamp.org/news/an-quick-introduction-to-material-design-using-materialize-8a9b223c64f1/

materialize

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/394586.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/394586.shtml
英文地址,請注明出處:http://en.pswp.cn/news/394586.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

python處理完數據導入數據庫_python 將execl測試數據導入數據庫操作

import xlrd import pymysql # 打開execl表 book xlrd.open_workbook(XXXX測試用例.xlsx) sheet book.sheet_by_name(Sheet1) # print(sheet.nrows) # 創建mysql連接 conn pymysql.connect( host127.0.0.1, userroot, password123456, dbdemo1, port3306, charsetutf8 ) # 獲…

增刪改查類

<?php // 所有數據表的基類 abstract class Model {protected $tableName "";protected $pdo "";protected $sql"";function __construct() {$pdo new PDO( "mysql:host" . DB_HOST . ";dbname" . DB_NAME, DB_USERN…

html網頁和cgi程序編程,CGI 編程方式學習

1.大家都知道CGI是通用網關接口&#xff0c;可以用來編寫動態網頁。而且CGI可以用很多種語言來寫&#xff0c;用perl來編寫最常見&#xff0c;我這里就是用perl來編寫做例子。講到編寫CGI編程方式&#xff0c;編寫CGI有兩程編程風格。(1)功能型編程(function-oriented style)這…

20175305張天鈺 《java程序設計》第四周課下測試總結

第四周課下測試總結 錯題 某方法在父類的訪問權限是public&#xff0c;則子類重寫時級別可以是protected。 A .true B .false 正確答案&#xff1a;B 解析&#xff1a;書P122&#xff1a;子類不允許降低方法的訪問權限&#xff0c;但可以提高訪問權限。 復雜題&#xff08;易錯…

強化學習q學習求最值_通過Q學習更深入地學習強化學習

強化學習q學習求最值by Thomas Simonini通過托馬斯西蒙尼(Thomas Simonini) 通過Q學習更深入地學習強化學習 (Diving deeper into Reinforcement Learning with Q-Learning) This article is part of Deep Reinforcement Learning Course with Tensorflow ??. Check the syl…

BZOJ 1113: [Poi2008]海報PLA

1113: [Poi2008]海報PLA Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 1025 Solved: 679[Submit][Status][Discuss]Description N個矩形,排成一排. 現在希望用盡量少的矩形海報Cover住它們. Input 第一行給出數字N,代表有N個矩形.N在[1,250000] 下面N行,每行給出矩形的長…

Python自動化運維之常用模塊—OS

os模塊的作用&#xff1a;  os&#xff0c;語義為操作系統&#xff0c;所以肯定就是操作系統相關的功能了&#xff0c;可以處理文件和目錄這些我們日常手動需要做的操作&#xff0c;就比如說&#xff1a;顯示當前目錄下所有文件/刪除某個文件/獲取文件大小……  另外&#…

opengl三維圖形圖形顏色_【圖形學基礎】基本概念

右手坐標系。類似OpenGL遵循的右手坐標系&#xff1a;首先它是三維的笛卡爾坐標系&#xff1a;原點在屏幕正中&#xff0c;x軸從屏幕左向右&#xff0c;最左是-1&#xff0c;最右是1&#xff1b;y軸從屏幕下向上&#xff0c;最下是-1&#xff0c;最上是1&#xff1b;z軸從屏幕里…

xp職稱計算機考試題庫,2015年職稱計算機考試XP題庫.doc

2015年職稱計算機考試XP題庫.doc (7頁)本資源提供全文預覽&#xff0c;點擊全文預覽即可全文預覽,如果喜歡文檔就下載吧&#xff0c;查找使用更方便哦&#xff01;9.90 積分&#xfeff;2015年職稱計算機考試XP題庫職稱計算機考試考點精編&#xff1a;工具欄的設置與操作XP中將…

Java基礎學習-Path環境變量的配置

1.為什么要進行Path環境變量的配置程序的編譯和執行需要使用到javac和java命令&#xff0c;所以只能在bin目錄下寫程序&#xff0c;而實際開發中&#xff0c;我們不可能將程序全部寫到bin目錄下&#xff0c;所以我們不許讓javac和java命令在任意目錄下都能夠被訪問。這時候&…

rails 共享變量_如何將Rails實例變量傳遞給Vue組件

rails 共享變量by Gareth Fuller由Gareth Fuller 如何將Rails實例變量傳遞給Vue組件 (How to pass Rails instance variables into Vue components) I’m currently working with a legacy Rails application. We are slowly transitioning the front-end from Rails views to…

Leetcode: Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1s in their binary representation and return them as an array.Example: For num 5 you should return [0,1,1,2,1,2].Follow up:It is very easy to c…

第一個python爬蟲_Python爬蟲01——第一個小爬蟲

Python小爬蟲——貼吧圖片的爬取 在對Python有了一定的基礎學習后&#xff0c;進行貼吧圖片抓取小程序的編寫。 目標&#xff1a; 首先肯定要實現圖片抓取這個基本功能 然后實現對用戶所給的鏈接進行抓取 最后要有一定的交互&#xff0c;程序不能太傻吧 一、頁面獲取 要讓pytho…

Mac下,如何把項目托管到Github上(Github Desktop的使用)

在上一篇中&#xff0c;詳細講解了使用X-code和終端配合上傳代碼的方法&#xff0c;這種方法比較傳統&#xff0c;中間會有坑&#xff0c;英文看起來也費勁&#xff0c;不過Github官方提供了一個Mac版的客戶端&#xff0c;如下圖&#xff1a; 附上下載鏈接&#xff1a;傳送門 下…

計算機網絡英文面試題,計算機網絡面試題整理

GET和POST的區別&#xff1f;GET和POST方法沒有實質上區別&#xff0c;只是報文格式不同。GET和POST是HTTP協議中的兩種請求方法。而 HTTP 協議是基于 TCP/IP 的應用層協議&#xff0c;無論 GET 還是 POST&#xff0c;用的都是同一個傳輸層協議&#xff0c;所以在傳輸上&#x…

利用遞歸求某數的階乘——C/C++

#include<stdio.h>int getFactorial(int n) {if(n0)return 1;else return n*getFactorial(n-1); }int main() {int n,res;scanf("%d",&n);res getFactorial(n);printf("%d",res);return 0; } 轉載于:https://www.cnblogs.com/daemon94011/p/106…

intern_充分利用Outreachy Intern申請流程

internby Joannah Nanjekye喬安娜南耶基(Joannah Nanjekye) 充分利用Outreachy Intern申請流程 (Get the most out of your Outreachy Intern application process) Outreachy gives three-month paid internships for persons that are underrepresented in tech. Interns ar…

Put-Me-Down項目Postmortem2

一.設想和目標二.計劃三.資源四.變更管理五.設計/實現六.測試/發布總結一.設想和目標 1. 我們的軟件要解決什么問題&#xff1f;是否定義得很清楚&#xff1f;是否對典型用戶和典型場景有清晰的描述&#xff1f; 我們的軟件要幫助低頭族控制使用手機時間。功能很明確&#xff0…

大數據實驗報告總結體會_建設大數據中臺架構思考與總結

簡介本文介紹完善的大數據中臺架構了解這些架構里每個部分的位置&#xff0c;功能和含義及背后原理及應用場景。幫助技術與產品經理對大數據技術體系有個全面的了解。數據中臺定義&#xff1a;集成離線數倉與實時數倉&#xff0c;并以多數據源統一整合采集到kafka,再通過kafka進…

半數集問題

給定一個自然數n&#xff0c;由n開始可以依次產生半數集set(n)中的數如下&#xff1a; (1) n ∈set(n)&#xff1b; (2) 在n的左邊加上一個自然數&#xff0c;但該自然數不能超過最近添加的數的一半&#xff1b; (3) 按此規則進行處理&#xff0c;直到不能再添加自然數為止。…