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 first-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.mzph.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;直到不能再添加自然数为止。…