2021-06-15 00:49:18 -07:00
|
|
|
---
|
|
|
|
id: bad87fee1348bd9aec908846
|
2021-07-26 03:17:00 +09:00
|
|
|
title: Criar um título com Bootstrap
|
2021-06-15 00:49:18 -07:00
|
|
|
challengeType: 0
|
|
|
|
forumTopicId: 16812
|
|
|
|
dashedName: create-a-bootstrap-headline
|
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
Agora vamos construir algo do zero para praticar nossa habilidade em HTML, CSS e Bootstrap.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
Vamos construir um playground jQuery, o qual vamos colocar em uso em breve nos desafios de jQuery.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
Para começar, crie um elemento `h3`, com o texto `jQuery Playground`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
Dê ao elemento `h3` uma cor com a classe `text-primary`, e centralize-o com a classe `text-center` do Bootstrap.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
Você deve adicionar um elemento `h3` à página.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert($('h3') && $('h3').length > 0);
|
|
|
|
```
|
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
O elemento `h3` deve ter uma tag de fechamento.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert(
|
|
|
|
code.match(/<\/h3>/g) &&
|
|
|
|
code.match(/<h3/g) &&
|
|
|
|
code.match(/<\/h3>/g).length === code.match(/<h3/g).length
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
O elemento `h3` deve ser colorido ao aplicar a classe `text-primary`
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert($('h3').hasClass('text-primary'));
|
|
|
|
```
|
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
O elemento `h3` deve ser centralizado ao aplicar a classe `text-center`
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert($('h3').hasClass('text-center'));
|
|
|
|
```
|
|
|
|
|
2021-07-26 03:17:00 +09:00
|
|
|
O elemento `h3` deve ter o texto `jQuery Playground`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert.isTrue(/jquery(\s)+playground/gi.test($('h3').text()));
|
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```html
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
```html
|
|
|
|
<h3 class="text-primary text-center">jQuery Playground</h3>
|
|
|
|
```
|