---
id: 587d78ae367417b2b2512afd
title: Use the flex-basis Property to Set the Initial Size of an Item
challengeType: 0
videoUrl: ''
localeTitle: Utilice la propiedad de base flexible para establecer el tamaño inicial de un artículo
---
## Description
La propiedad de flex-basis
especifica el tamaño inicial del elemento antes de que CSS realice ajustes con flex-shrink
o flex-grow
. Las unidades utilizadas por la propiedad de flex-basis
son las mismas que otras propiedades de tamaño ( px
, em
, %
, etc.). El valor auto
dimensiona los elementos en función del contenido.
## Instructions
Establezca el tamaño inicial de las cajas utilizando flex-basis
. Agregue la propiedad CSS flex-basis
a #box-1
y #box-2
. Dé a #box-1
un valor de 10em
y #box-2
un valor de 20em
.
## Tests
```yml
tests:
- text: 'El elemento #box-1
debe tener una propiedad de flex-basis
.'
testString: 'assert($("#box-1").css("flex-basis") != "auto", "The #box-1
element should have a flex-basis
property.");'
- text: 'El elemento #box-1
debe tener un valor de flex-basis
de 10em
.'
testString: 'assert(code.match(/#box-1\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?10em;/g), "The #box-1
element should have a flex-basis
value of 10em
.");'
- text: 'El elemento #box-2
debe tener la propiedad de flex-basis
.'
testString: 'assert($("#box-2").css("flex-basis") != "auto", "The #box-2
element should have the flex-basis
property.");'
- text: 'El elemento #box-2
debe tener un valor de flex-basis
de 20em
.'
testString: 'assert(code.match(/#box-2\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?20em;/g), "The #box-2
element should have a flex-basis
value of 20em
.");'
```
## Challenge Seed
## Solution
```js
// solution required
```