<sectionid="description"> Puede usar CSS <code>@keyframes</code> para cambiar el color de un botón en su estado activo. Aquí hay un ejemplo de cómo cambiar el ancho de una imagen al mover el mouse: <blockquote><estilo><br> img: hover { <br> nombre de la animación: ancho; <br> animación-duración: 500ms; <br> } <br><br> ancho de @keyframes { <br> 100% { <br> ancho: 40px; <br> } <br> } <br></style><br><br><img src = "https://bit.ly/smallgooglelogo" alt = "Logo de Google" /></blockquote></section>
<sectionid="instructions"> Tenga en cuenta que <code>ms</code> representa milisegundos, donde 1000 ms es igual a 1 s. Use CSS <code>@keyframes</code> para cambiar el <code>background-color</code> de <code>background-color</code> del elemento del <code>button</code> para que se convierta en <code>#4791d0</code> cuando un usuario se <code>#4791d0</code> sobre él. La regla <code>@keyframes</code> solo debe tener una entrada para el <code>100%</code> . </section>
- text: La regla @keyframes debe usar el <code>animation-name</code> de color de fondo.
testString: 'assert(code.match(/@keyframes\s+?background-color\s*?{/g), "The @keyframes rule should use the <code>animation-name</code> background-color.");'
testString: 'assert(code.match(/100%\s*?{\s*?background-color:\s*?#4791d0;\s*?}/gi), "There should be one rule under <code>@keyframes</code> that changes the <code>background-color</code> to <code>#4791d0</code> at 100%.");'