10 Essential Twitter Bootstrap Interview Questions *

Toptal提供了最好的Twitter Bootstrap开发人员和工程师可以回答的基本问题. 在我们社区的推动下,我们鼓励专家提交问题并提供反馈.

Hire a Top Twitter Bootstrap Developer Now
Toptal logo是顶级自由软件开发人员的专属网络吗, designers, finance experts, product managers, and project managers in the world. 顶级公司雇佣Toptal自由职业者来完成他们最重要的项目.

Interview Questions

1.

解释一下下面的代码是做什么的,以及它们在哪里有用:

Home 36
View answer

这段代码将生成一个带有内联徽章的链接,该徽章向用户提供重要的通知, 例如收到或未读消息的数量或好友请求的数量. 徽章最常用于消息应用程序和社交网站.

2.

Consider the HTML code snippet below.


What is missing for a tooltip to show properly?

View answer

Bootstrap’s Tooltip plugin is not CSS-only, like other plugins are. 出于性能原因,工具提示插件是可选的,您可以使用它 must 用JavaScript用下面的示例代码初始化它:

$(function () {
  $('[data-toggle="tooltip"]').tooltip();
});
3.

下面两行代码的区别是什么?

$('#myModalPrompt').modal({ keyboard: false });
$.fn.modal.Constructor.DEFAULTS.keyboard = false;

Explain your answer.

View answer

第一行将初始化带有id的模态对话框提示符 #myModalPrompt, and set only it to ignore keyboard event. 第二行将通过修改插件的默认设置来改变modal插件的默认设置 Constructor.DEFAULTS 对象,并将对所有模态对话框提示产生影响.

Apply to Join Toptal's Development Network

and enjoy reliable, steady, remote Freelance Twitter Bootstrap Developer Jobs

Apply as a Freelancer
4.

Consider the HTML code snippet below. What will the output be, and why?

65% sucesfuly completed
20% completed with warnings
15% did not complete
View answer

By placing multiple bars under the same .progress 元素,Bootstrap会将它们叠加到一个进度条中. 由于进度条的总和是100%,因此进度条将是全宽的,并且完全填充.

5.

使用以下代码创建的警报的默认Bootstrap外观将是什么:


View answer

警报消息用于提供通常需要用户注意的反馈消息. 这里需要注意的是,Bootstrap Alerts没有默认类. If a contextual class such as .alert-success, .alert-info, .alert-warning, or .alert-danger,则会创建默认的灰色警报.

6.

What will be the output of the following HTML code:

  • Item 1
  • Item 2
    • Nested item 2.1
    • Nested item 2.2
    • Nested item 2.3
  • Item 3

Explain your answer.

View answer

If we apply .list-unstyled 对于列表,它将删除列表项的默认列表样式和左边距. But only for the immediate children. Main list items will be without any style, 嵌套列表项仍然具有默认的无序嵌套列表样式.

7.

作为Bootstrap默认排版的一部分,应用了哪些全局样式?

View answer

Bootstrap sets the global default font-size to 14px, with a line-height of 1.428. 默认字体改为Helvetica和Arial,并带有无衬线字体. All these styles are applied to the and all paragraphs, with the addition that

(段落)的下边距为其计算行高的一半,默认为10px.

8.

Consider the following HTML code snippet:

.col-xs-12 .col-md-3
.col-xs-12 .col-md-3
.col-xs-12 .col-md-3
.col-xs-12 .col-md-3

下面的HTML代码在移动和桌面视图上的输出是什么? Explain your answer.

View answer

.col-xs-* 类定义了用于超小型设备的网格数量,和 .col-md-* 定义桌面设备及以上设备的网格数量. 这个示例将在桌面上呈现四列, 在移动设备上,列将具有全宽度,并将堆叠在一起.

9.

默认情况下,Bootstrap网格系统使用了多少不同的媒体查询?

View answer

Bootstrap网格系统提供了四层类: xs for phones (<768px), sm for tablets (≥768px), md for desktops (≥992px), and lg for large desktops (≥1200px). 这个问题隐藏的诀窍是,只有三个媒体查询. Bootstrap is mobile first by design, so the default styles are for small devices, 然后在更大的屏幕上添加媒体查询, as follow in LESS code:

/* Extra small devices (phones, less than 768px) */
/*没有媒体查询,因为这是Bootstrap的默认设置*/

/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) { ... }

/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md-min) { ... }

/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg-min) { ... }
10.

Bootstrap需要哪些依赖项才能正常工作?

View answer

Bootsrap需要的唯一依赖项是jQuery, and this is only for Bootstrap’s JavaScript plugins. At the moment, Bootsrap v3.3.4 requires jQuery v1.9.1 or later.

面试不仅仅是棘手的技术问题, so these are intended merely as a guide. 并不是每一个值得雇佣的“A”候选人都能回答所有的问题, 回答所有问题也不能保证成为A级考生. At the end of the day, hiring remains an art, a science — and a lot of work.

Why Toptal

Tired of interviewing candidates? Not sure what to ask to get you a top hire?

Let Toptal find the best people for you.

Hire a Top Twitter Bootstrap Developer Now

我们的Twitter Bootstrap开发者独家网络

希望找到一份工作,作为一个Twitter Bootstrap开发者?

Let Toptal find the right job for you.

Apply as a Twitter Bootstrap Developer

Job Opportunities From Our Network

Submit an interview question

提交的问题和答案将被审查和编辑, and may or may not be selected for posting, at the sole discretion of Toptal, LLC.

* All fields are required

Looking for Twitter Bootstrap Developers?

Looking for Twitter Bootstrap Developers? Check out Toptal’s Twitter Bootstrap developers.

Aitizaz Khan

Freelance Twitter Bootstrap Developer

United StatesToptal Member Since February 24, 2017

Aitizaz是一名精通Ruby on Rails和Java的全栈工程师. 他对算法级效率非常感兴趣,并且具有前端和后端技术以及框架的工作经验. Aitizaz也是一个有竞争力的程序员,他积极参与各种在线挑战. 他喜欢学习任何东西,尤其是那些能让他在自己的手艺上做得更好的东西.

Show More

Milana Cap

Freelance Twitter Bootstrap Developer

SerbiaToptal Member Since January 9, 2017

Milana is a self-taught WordPress/PHP engineer. She started learning PHP in 2008, 自2010年以来,他一直是一名自由撰稿人. 自2011年以来,她一直是一名全栈工程师,自2015年3月以来,她一直是一名全职WordPress主题开发人员和项目负责人.

Show More

David Marín

Freelance Twitter Bootstrap Developer

SpainToptal Member Since July 2, 2015

David是一名开源和开放数据爱好者,拥有超过23年的专业开发经验. He has acquired various skills, including web programming (PHP and JavaScript), C, C++ (under Linux and Windows), and systems management. Of these skills, David擅长web编程,并拥有基于Symfony php的后端全栈经验, jQuery front ends, and WordPress/WooCommerce-based sites.

Show More

Toptal Connects the Top 3% of Freelance Talent All Over The World.

Join the Toptal community.

Learn more