bulma.css_如何建立一个? 具有Bulma CSS的特斯拉响应页面
bulma.css
by ZAYDEK
由ZAYDEK
0-60 in 1.9s? (0-60 in 1.9s ?)
如何建立一个? 具有Bulma CSS的特斯拉响应页面 (How To Build A ? Responsive Tesla Launch Page With Bulma CSS)
加速可持续网页设计的到来 (To accelerate the advent of sustainable web design)
Before I get to the article, I just want to share that I’m building a product, and I would love to collect some data about how to better serve web developers. I created a short questionnaire to check out before or after reading this article. Please check it out — thanks! And now, back to our regular scheduled programming.
在开始阅读本文之前,我只想分享我正在开发的产品,并且我希望收集一些有关如何更好地为Web开发人员提供服务的数据。 在阅读本文之前或之后,我创建了一个简短的问卷调查表以进行检查。 请检查一下-谢谢! 现在,回到我们的常规计划编程。
您好,互联网! (埃隆,你好!) (Hello internet! (Hi Elon!))
I’m here to disabuse you from the belief that building websites has to be hard. Furthermore, in mere minutes we mere mortals will learn how to build a beautiful and(!) responsive Tesla launch page using Bulma.
我是在这里让您不相信建立网站一定很困难的信念。 此外,在短短的几分钟内,我们这些凡人将学习如何使用布尔玛构建漂亮且响应Swift的特斯拉发布页面。
布尔玛? Bulma是CSS框架,是@jgthms的创意。 ? (Bulma?! Bulma is a CSS framework and brainchild of @jgthms. ?)
我还在Scrimba.com上教授了免费的布尔玛CSS全长课程,我们在其中构建这些️? 设计。 点击此处免费注册! ? (I also taught a free, full-length Bulma CSS course on Scrimba.com, where we build these ️? designs. Click here to enroll for free! ?)
Scrimba.com是面向前端开发人员的下一代平台,可以将其网站记录和共享为交互式截屏视频! ? (Scrimba.com is a next-generation platform for front-end developers to record and share their websites as interactive screencasts! ?)
布尔玛? ¯\ _(ツ)_ /¯ (Bulma? ¯\_(ツ)_/¯)
Bulma solves a lot of problems — a lot. Whether you need a visual component, or you want to understand how a component might be codified, with best practices and best-in-class documentation, Bulma’s here to help! ??
布尔玛解决了很多问题-很多。 无论您是需要视觉组件,还是想了解如何使用最佳实践和一流的文档来编写组件 ,布尔玛都将在这里为您提供帮助!
Bulma’s not even version 1.0, and has major adoption with 150K+ downloads a month and 26K+ stars on GitHub. Think of Bulma as a competitor to Bootstrap, despite the fact that it’s *just* CSS. ? Look ma, no YavaScript!
Bulma的版本甚至不是1.0,并且已被广泛采用,每月有150K +的下载量 ,在GitHub上有26K +的星级 。 尽管Bulma只是CSS,但可以将Bulma视为Bootstrap的竞争对手。 ? 看吧,没有Y avaScript!
布尔玛如何运作? (How does Bulma work?)
Bulma uses several techniques to create a cohesive interface for developers. We need just be concerned with describing our website’s design using semantic classes — not elements — or in other words, idiomatic templates.
Bulma使用多种技术来为开发人员创建一个紧密的接口。 我们只需要关心使用语义类(而不是元素)或惯用模板来描述我们网站的设计。
These semantic templates can be thought of as interconnecting building-blocks we use to build websites fast! ⚡️ These components are also responsive out-of-the-box, meaning we can focus more on our content than the code.
这些语义模板可以被认为是我们用来快速构建网站的相互联系的构建模块! ⚡️这些组件也具有开箱即用的响应能力,这意味着我们可以比代码更专注于我们的内容。
困惑? 开始吗? ^ h 埃雷首先学习布尔玛的基本面。 (Confused? Start ? here to first learn the fundamentals of Bulma.)
那个怎么样 ? 设计? (What about that ? design?)
This design can be better understood as three parts:
此设计可以更好地理解为三个部分 :
☝️Responsive background✌️ Bulma components + modifiers? CSS Grid
☝️ 响应式背景 ✌️ 布尔玛组件+修饰符 ? C SS网格
Look a littttle closer…see something? The background isn’t continuous! ? This isn’t a mistake; the Tesla team optimized for desktop, tablet, and mobile. With that as our base, we’ll add Bulma components and modifiers, then use CSS Grid to achieve the intricate responsive design for the specs.
仔细看一下……看到什么了吗? 背景不是连续的! ? 这不是错误; Tesla团队针对台式机,平板电脑和移动设备进行了优化。 在此基础上,我们将添加Bulma组件和修饰符,然后使用C SS Grid实现规格的复杂响应设计。
☝️响应式背景 (☝️ Responsive background)
These are the actual background images I ??????? from tesla.com! ?☠️ Sooo…how do we build a responsive background? Using media queries, obvs! Media queries allow us to, given certain circumstances, override CSS.
这些是实际的背景图像I ??????? 来自tesla.c om! ☠️Sooo ...我们如何建立快速响应的背景? 使用媒体查询,观察! 在某些情况下,媒体查询使我们能够覆盖CSS。
And media queries are powerful; we can override CSS depending on the website’s rendered aspect ratio, the device’s aspect ratio, or simple-and-plain: the website’s rendered width. Yeah — let’s go with that.
媒体查询功能强大; 我们可以根据网站的渲染长宽比,设备的长宽比或简单的方式(网站的渲染宽度)覆盖CSS。 是的-让我们一起去吧。
First, we start with one of Bulma’s components, .hero
, and use one of its modifiers, is-fullheight
, to create a fullscreen section. Then, we assign various backgrounds for common widths using media queries:
首先,我们从布尔玛的一个组件.hero
,并使用其修饰符之一is-fullheight
创建一个全屏部分。 然后,我们使用媒体查询为通用宽度分配各种背景:
Great — so now our website swaps backgrounds at 1024px
and 768px
. Sometimes when this happens, there’s a flash of white, so black
conceals it. And center
and cover
just help align and focus the image.
太好了-现在我们的网站将背景1024px
和768px
。 有时,当这种情况发生时,会有白色闪烁,因此black
将其隐藏。 center
和cover
仅有助于对齐和聚焦图像。
Believe it or not, background
is shorthand for 8 CSS properties: ?
信不信由你, background
是8个CSS属性的简写 :
1.️ background-clip
2. background-color
3. background-image
4. background-origin
5. background-position
6. background-repeat
7. background-size
8. background-attachment
1.️background background-clip
2. background-color
3. background-image
4. background-origin
5. background-position
6. background-repeat
7. background-size
8. background-attachment
We made use of -color
, -image
, -position
, and -size
!
我们利用了-color
, -image
, -position
和-size
!
B️布尔玛组件+修饰符 (✌️ Bulma components + modifiers)
This is where Bulma gets interesting. Which one is the real launch page?!
这是布尔玛变得有趣的地方。 真正的启动页面是哪一个?
…
…
…
…
…
…
The left one is authentic! ٩(;ʘ¿ʘ;)۶ Wait…how can Bulma be so versatile? Well — remember modifiers? Yeah so, with enough modifiers at our disposal, we can create a varied aesthetic, even without editing Bulma’s source.
左一个是正品 ! ۶(;ʘ¿ʘ;)۶等等...布尔玛怎么会如此多才多艺? 好吧-还记得修饰符吗? 是的,即使没有编辑布尔玛的资料,我们只要拥有足够的修饰符,就可以创造出多种美感。
Now, without further ado, I present the launch page as ASCII art! ??
现在,事不宜迟,我将启动页面显示为ASCII艺术! ??
You can ignore the IDs wrapped with parentheses for now. Other than that, these are a few of the available Bulma components. And imagine this, ? Bulma’s components are responsive, too! Whoa.
您现在可以忽略用括号括起来的ID。 除此之外,还有一些可用的布尔玛组件 。 想象一下, Bulma的组件也具有响应能力! 哇
Bear in mind, this is far less terse than the actual implementation, see here. I’m obfuscating modifiers and extraneous HTML to show how Bulma works; we link components together, just like LEGO, but to design a webpage!
请记住,这比实际的实现要简洁得多, 请参见此处 。 我混淆了修饰符和无关HTML,以显示布尔玛的工作方式; 我们将各个组件链接在一起,就像乐高游戏一样,只是设计一个网页!
And modifiers are how we can achieve a Tesla-like aesthetic, despite that Bulma has nothing to do with Tesla. Throughout the code, notice the *extensive* use of has-*
and is-*
; this is what gives us a varied aesthetic.
尽管布尔玛与特斯拉无关,但修饰符是我们如何实现特斯拉式美学的方式。 在整个代码中 ,请注意has-*
和is-*
的*广泛使用; 这就是给我们带来多样化美学的原因。
您可以点击? ^ h 埃雷更多地了解布尔玛的组件。 (You can click ? here to learn more about Bulma’s components.)
? CSS网格 (? CSS Grid)
Do we need CSS Grid? I’m not sure, (>﹏<) but I found programming the responsive design for the specs much easier than I anticipated using grid than some other technique. So, here’s where those IDs come into focus:
我们需要CSS网格吗? 我不确定(>﹏<),但是我发现为规范编写响应式设计要比使用网格预期的要容易得多。 因此,以下是这些ID的重点:
Hehehe…so we have IDs #a
through #e
, with #a
being some marketing, and #e
being the “Reserve Now” button. The desired effect is that on mobile we sneak the “Reserve Now” button under #b
, #c
, and #d
.
呵呵……所以我们有ID #a
到#e
,其中#a
是一些营销, #a
#e
是“立即预订”按钮。 理想的效果是在移动设备上,我们在#b
, #b
#c
和#d
下潜入了“立即预订”按钮。
3…
3…
2…
2…
1… ?
1…?
In the first slide, we assign identifiers to each of the IDs using grid-area
. Then, we communicate to #grid
the *shape* of our grid using ASCII art! ? This is the default grid; for desktop and tablet.
在第一张幻灯片中,我们使用grid-area
将标识符分配给每个ID。 然后,我们使用ASCII艺术与#grid
的* shape *通信! ? 这是默认网格; 用于台式机和平板电脑。
Last — remember media queries? YAS! All we need to do is to communicate the shape of our grid for mobile. Imagine this…we write a single media query to override the shape of our grid for mobile. ?⚡️
最后-还记得媒体查询吗? 是的! 我们需要做的就是传达移动网格的形状。 想象一下……我们编写了一个媒体查询来覆盖移动电话网格的形状。 ⚡️
布尔玛课程提供完整的交互式代码? 嗯 (The full interactive code is available in the Bulma course ? here.)
还是……保时捷怎么样?!? ? (Or…HOW ABOUT PORSCHE?!!? ?)
Nikita Rudenko @rdnkta, who is new to #100DaysOfCode(!), created this after finishing the course, and shared it with me! Cheers! ?
#100DaysOfCode(!)的新用户Nikita Rudenko @rdnkta ,在完成课程后创建了此文件,并与我分享了! 干杯! ?
恭喜! 谢谢阅读! 6(^ω^)9 (Congratz! Thanks for reading! 6(^ω^)9)
Now is a phenomenal time like no other to get into front-end development. With the introduction of CSS specs like Flexbox and CSS Grid, and frameworks like Bulma, building for the web has never been more accessible!
现在是进入前端开发的绝佳时机。 随着诸如Flexbox和CSS Grid之类CSS规范的引入,以及诸如Bulma之类的框架的引入,为网络构建提供了前所未有的便利!
喜欢这篇文章吗? 就像这样还有另一篇文章! 点击? e! (Like this article?! There’s one more article just like it! Click ? here!)
翻译自: https://www.freecodecamp.org/news/how-to-build-a-responsive-tesla-launch-page-with-bulma-css-2bf484057349/
bulma.css
相关文章:

hdu 5099 Comparison of Android versions 枚举题意
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid5099 卡读题,实际上题目中表述的题意并不完整,所以要认真读并且加上一些现实的“常识” 关于枚举题意,感觉应该三个人分别看,然后讨论出最有可能的题意是什么 为了…

去除按钮的样式
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 去除按钮默认点击效果: 在button标签里面添加属性: hover-class"none"; 为了方便大家,下面列出微信请求服务器常用的几种方…

移动应用程序和网页应用程序_您的移动应用程序运行缓慢的主要原因以及如何修复它...
移动应用程序和网页应用程序by Rajput Mehul通过拉杰普特梅胡尔(Rajput Mehul) 您的移动应用程序运行缓慢的主要原因以及如何修复它 (Top Reasons Why Your Mobile App is Slow and How to Fix it) At a time when technology is moving ahead at an express pace and people …

邮箱验证功能原理 语法 属性
邮箱验证功能原理 1 [已解决问题] 浏览: 3508次 很多地方都在注册账号的时候使用邮箱验证功能。注册后发送一封邮件到注册邮箱里面。然后点击 邮箱里面的链接 激活邮箱。 还有手机验证 这些的原理是 怎么样的。忘指点 .NET技术 ASP.NETyzy | 菜鸟二级 | 园豆:295 提…

直接通过OptionalAttribute, DefaultParameterValueAttribute定义缺省参数
转载于:https://www.cnblogs.com/liuxiaoji/p/4519266.html

微信小程序学习做动画效果
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 微信扫码学习,在线指导微信小程序动画效果的实现

rails 添加外键_如何在Rails后端中添加功能强大的搜索引擎
rails 添加外键by Domenico Angilletta通过多梅尼科安吉列塔(Domenico Angilletta) In my experience as a Ruby on Rails Developer, I often had to deal with adding search functionality to web applications. In fact, almost all applications I worked on at some poi…

基础总结篇之一:Activity生命周期
子曰:溫故而知新,可以為師矣。《論語》 学习技术也一样,对于技术文档或者经典的技术书籍来说,指望看一遍就完全掌握,那基本不大可能,所以我们需要经常回过头再仔细研读几遍,以领悟到作者的思想精…

spring mvc 关键接口 HandlerMapping HandlerAdapter
HandlerMapping Spring mvc 使用HandlerMapping来找到并保存url请求和处理函数间的mapping关系。 以DefaultAnnotationHandlerMapping为例来具体看HandlerMapping的作用 DefaultAnnotationHandlerMapping将扫描当前所有已经注册的spring beans中的requestmapping标注以找出…

js 微信小程序日期 时间转时间戳
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 微信小程序开发交流qq群 173683895 日期转换成时间戳:new Date(2018-09-03 15:46:13).getTime() 示例代码: console.log(new Date(2018-09-03 15:46:13)) 这个打印结果应该是…

小狗钱钱_✅每次构建待办事项列表应用程序时,都会有一只小狗? 死了?
小狗钱钱by Hrishi Mittal由Hrishi Mittal ✅每次构建待办事项列表应用程序时,都会有一只小狗 ? 死了? (✅ Every time you build a to-do list app, a puppy ? dies ?) You know when you’re trying to learn something new, but get re…

[Android编程心得] Camera(OpenCV)自动对焦和触摸对焦的实现
http://blog.csdn.net/candycat1992/article/details/21617741 实现 以OpenCV的JavaCameraView为例,首先需要定制自己的Camera,主要代码如下:[java] view plaincopy print?import java.util.ArrayList; import java.util.List; import o…

create-react-app my-app 报错解决方法
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 第一个原因:可能是没安装镜像, 解决方法: $ npm install -g cnpm --registryhttps://registry.npm.taobao.org 第二个原因: 报错日志: h…

越南一难倒博士的趣味数学题
越南有一道难倒博士的趣味数学题,见下图: 在空格中填入1...9,可以重复,求使等式成立的一个组合 我吐槽一下,这题在NOIP中肯定算水题了,爆搜都能过。O(9n),n9 我就不具体代码实现了。 据说有人跟我一样的想…

学习使用React和Electron一次构建自己的桌面聊天应用程序
by Alex Booker通过亚历克斯布克 学习使用React和Electron一次构建自己的桌面聊天应用程序 (Learn to build your own desktop chat app with React and Electron, one step at a time) This tutorial was written in collaboration with the awesome Christian Nwamba.本教程…

数据库删除,存储
布局主要分两个 其中主布局是 <?xml version"1.0" encoding"utf-8"?> <EditText android:id"id/yf_input" android:layout_width"wrap_content" android:layout_height"wrap_content" android:hint"" …

【Ant Design Pro 一】 环境搭建,创建一个demo
技术交流qq群 173683895 搭建 Ant Design Pro 的前期准备:你的本地环境需要安装 cnpm、node。 注:代码块中的 $ 代表: $后面是在命令行输入的命令,举例 $ npm start 解:实际上是应该打开命令行输入 npm start 下…

JOptionPane
JOptionPane类 1、属于javax.swing 包。 2、功能:定制四种不同种类的标准对话框。 ConfirmDialog 确认对话框。提出问题,然后由用户自己来确认(按"Yes"或"No"按钮) InputDialog 提示输入文本 MessageDialog …

react 错误边界_React with GraphQL和错误边界中的自定义错误页面
react 错误边界by Abi Noda通过Abi Noda React with GraphQL和错误边界中的自定义错误页面 (Custom error pages in React with GraphQL and Error Boundaries) If you like this article please support me by checking out Pull Reminders, a Slack bot that sends your tea…

UITextField 限制用户输入小数点后位数的方法
UITextField 限制用户输入小数点后位数的方法 位数限制: limited 在UITextField的代理方法中添加类似如下代码 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {NSMutableString * futureStr…

[BZOJ 1002] [FJOI 2007] 轮状病毒
1002: [FJOI2007]轮状病毒 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 3045 Solved: 1687[Submit][Status][Discuss]Description 给定n(N<100),编程计算有多少个不同的n轮状病毒。 Input 第一行有1个正整数n。 Output 将编程计算出的不同的n轮状病毒数输出…

微信小程序左上角返回按钮跳转到指定页面
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 在当前页面的 onUnload 执行页面跳转 onUnload: function () {wx.reLaunch({url: ../logs/logs})}, 代码讲解:监听页面卸载的函数,把页面重定向到指定的 页面;

过度沉思_从沉思到演出:我如何开始我的自由职业
过度沉思by Ashley MacWhirter作者:Ashley MacWhirter 从沉思到演出:我如何开始我的自由职业 (From grit to gigs: how I started my freelancing business) In less than one year, I went from a Georgia Tech Coding Bootcamp graduate to a busines…

拾人牙慧篇之———QQ微信的第三方登录实现
一、写在前面 关于qq微信登录的原理之流我就不一一赘述了,对应的官网都有,在这里主要是展示我是怎么实现出来的,看了好几个博客,有的是直接复制官网的,有的不知道为什么实现不了。我只能保证我的这个是我实现后才贴出来…

win7旗舰版下配置IIS服务器
选择上述的插件后,Windows 需要更新一段时间,并重启电脑 测试是否安装成功:http://localhost 注意:默认端口号是 80,不能和tomcat 的 80 端口同时重启 常见问题: 1.默认页面或者新添加的网站一直出现…

微信小程序 加载中 动画效果
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 效果图: 代码: <view class"line"><image src"../../img/line.png"></image></view>.line {height:1px;position:absolute;animat…

java开放源码_开放源码的第一周:我是如何参与的,以及我学到的东西
java开放源码by Chak Shun Yu泽顺宇 开放源码的第一周:我是如何参与的,以及我学到的东西 (My first week of open source: how I got involved, and what I’ve learned) When I started to write this post, I had finished my first serious week of …

几个不错的开源的.net界面控件
转自原文 几个不错的开源的.net界面控件 (转) 几个不错的开源的.net界面控件 - zt 介绍几个自己觉得不错的几个开源的.net界面控件,不知道是否有人介绍过。 DockPanel Suite:开发类似VS.NET的界面,#Develop就是使用的这个控件。 网址&#…

CSS 盒子模型(转)
CSS中, Box Model叫盒子模型(或框模型),Box Model规定了元素框处理元素内容(element content)、内边距(padding)、边框(border) 和 外边距(margin…

React 入门笔记 1
React的核心:JSX 首先,React 的页面就是js文件,看到这会有朋友疑惑了,js怎么写标签组件? 解:首先,我们需要了解JSX,什么是JSX? JSX就是JavaScript XML。一种在React组件…