1.8 KiB
1.8 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d78ae367417b2b2512aff | Use the order Property to Rearrange Items | 0 |
Description
order
é usada para informar ao CSS a ordem de como os itens flexíveis aparecem no contêiner flexível. Por padrão, os itens aparecerão na mesma ordem em que aparecem no HTML de origem. A propriedade aceita números como valores e números negativos podem ser usados. Instructions
order
a ambos #box-1
e #box-2
. Dê a #box-1
um valor de 2 e dê a #box-2
um valor de 1. Tests
tests:
- text: 'O elemento <code>#box-1</code> deve ter a propriedade <code>order</code> configurada para um valor de 2.'
testString: 'assert($("#box-1").css("order") == "2", "The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.");'
- text: 'O elemento <code>#box-2</code> deve ter a propriedade <code>order</code> configurada para um valor de 1.'
testString: 'assert($("#box-2").css("order") == "1", "The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.");'
Challenge Seed
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
height: 200px;
width: 200px;
}
#box-2 {
background-color: orangered;
height: 200px;
width: 200px;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
Solution
// solution required