You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/12-Relative-Length-EM-REM/README.es.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# `12` Longitud Relativa em, rem:
1
+
# `12` Longitud Relativa em, rem
2
2
3
3
Hasta ahora, hemos trabajado con píxeles como unidad de medida, por ejemplo, diciendo que un contenedor o caja tiene `100px` de ancho.
4
4
@@ -8,11 +8,13 @@ Hay otros tipos de unidades que no son absolutas, sino relativas. Las usamos cua
8
8
9
9
En este ejercicio tenemos dos encabezados `<h2>`. Ambos son `<h2>`, pero uno es más grande que el otro porque los encabezados tienen `font-size` relativos por defecto.
10
10
11
-
Dado que el primer`div` tiene un `font-size` más grande, el título cambia de tamaño en consecuencia y el `heading` se adapta.
11
+
Dado que el segundo`div` tiene un `font-size` más grande, el título cambia de tamaño en consecuencia y el `heading` se adapta.
12
12
13
-
em: Relativo al `font-size` actual del padre.
13
+
## En resumen:
14
14
15
-
rem: Relativo al `font-size` original de la página.
15
+
+ em: Relativo al `font-size` actual del padre.
16
+
17
+
+ rem: Relativo al `font-size` original de la página.
Copy file name to clipboardExpand all lines: exercises/12-Relative-Length-EM-REM/README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,20 @@
1
1
# `12` Relative Length em, rem
2
2
3
-
By now, we are used to working with pixels as measurement unit, for example, saying that a box has `100px` of width.
3
+
By now, we are used to working with pixels as a measurement unit, for example, saying that a box has `100px` of width.
4
4
5
5
There are other types of units that are not fixed, but relative. We use them when we want the element size to be related to another element or measurement unit.
6
6
7
7
## Example using em:
8
8
9
9
In this exercise we have two `<h2>` headings. They are both `<h2>`, but one is bigger than the other because headings have relative font-sizes by default.
10
10
11
-
Since the first`div` has a bigger based `font-size`, then the heading resizes accordingly.
11
+
Since the second`div` has a bigger based `font-size`, then the heading resizes accordingly.
12
12
13
-
em: Relative to the current font-size of the parent.
13
+
## In short:
14
14
15
-
rem: Relative to the original font-size of the page.
15
+
+ em: Relative to the current font-size of the parent.
16
+
17
+
+ rem: Relative to the original font-size of the page.
Los enlaces (`anchors`) no solo se usan dentro del texto: cuando va a usar enlaces (`anchors`) fuera del texto, es mejor hacer que se vean como botones para que sea experiencia más amigable.
3
+
Los enlaces (`anchors`) no solo se usan dentro del texto: cuando usas enlaces (`anchors`) fuera del texto, es mejor hacer que se vean como botones para que la experiencia del usuario sea más amigable.
4
4
5
5
## 📝 Instrucciones:
6
6
7
-
Siga estos pasos para que tu enlace (`anchor`) se vea así:
7
+
Sigue estos pasos para que tu enlace (`anchor`) se vea así:
8
8
9
9
1. Haz que se vea como una caja: establece el `padding` en `10px`.
10
10
11
11
2. Bordes redondeados: establece el `border-radius` en `4px`.
12
12
13
-
3. El `background` debe ser de color `orange`, y cuando el ratón esté sobre el botón (`:hover`), el `background` debe ser `darkorange`
13
+
3. El `background` debe ser de color `orange`, y cuando el ratón esté sobre el botón (`:hover`), el `background` debe ser `darkorange`.
14
14
15
-
4.Encuentra y aplica el color: usa el selector de `color` (color picker) para encontrar el color exacto y aplicárselo al `background`.
15
+
4.Eliminar subrayado: establece `text-decoration` a `none`.
16
16
17
-
5.Eliminar subrayado: establece `text-decoration` a `none`.
17
+
5.Establece el color del texto a blanco (`white`)
18
18
19
-
6. Establecer el color del texto en blanco (`white`)
19
+
+*Para que el botón se vea diferente cuando el usuario pasa el ratón por encima, usamos el selector `:hover`: https://www.w3schools.com/cssref/sel_hover.php*
20
20
21
-
*Para que el botón se vea diferente cuando el usuario pasa el mouse por encima, usamos el selector `:hover`: http://lmgtfy.com/?q=how+to+use+the+hover*
21
+
6. Dentro del selector `:hover` cambia el fondo del botón a `darkorange`.
22
22
23
-
7. Dentro del selector `:hover` cambia el fondo del botón a `#cc7a00`.
Anchors are not only used within text- when you are going to use anchors outside text, it is better to make them look like buttons for a more user-friendly experience.
3
+
Anchors are not only used within text: when you are going to use anchors outside text, it is better to make them look like buttons for a more user-friendly experience.
4
4
5
5
## 📝 Instructions:
6
6
7
-
1. Make it look like a box: Set`padding` to `10px`.
7
+
1. Make it look like a box: set`padding` to `10px`.
8
8
9
-
2. Rounded borders: Set`border-radius` to `4px`.
9
+
2. Rounded borders: set`border-radius` to `4px`.
10
10
11
11
3. The background should be `orange` when not hovered, and `darkorange` on hover (`:hover`).
12
12
13
-
4.Find and apply the color: Use the color picker to find the color and apply make the background to that color.
13
+
4.Remove underline: set `text-decoration`to `none`.
14
14
15
-
5.Remove underline: Set `text-decoration` to `none`.
15
+
5.Set the color of the text to `white`.
16
16
17
-
6. Set the color of the text to `white`.
17
+
+*To make the button look different when the user hovers over with the mouse, we use the `:hover` selector: https://www.w3schools.com/cssref/sel_hover.php*
18
18
19
-
*To make the button look different when the user hovers over with the mouse, we use the `:hover` selector: http://lmgtfy.com/?q=how+to+use+the+hover*
20
-
21
-
7. Inside of the `:hover` selector change the background of the button to `#cc7a00`.
19
+
6. Inside of the `:hover` selector change the background of the button to `darkorange`.
0 commit comments