https://github.com/adnksharp/web-p-toggle-html-class
manejo de clases con HTML, CSS y Javascript
https://github.com/adnksharp/web-p-toggle-html-class
html-css-javascript
Last synced: 11 months ago
JSON representation
manejo de clases con HTML, CSS y Javascript
- Host: GitHub
- URL: https://github.com/adnksharp/web-p-toggle-html-class
- Owner: adnksharp
- Created: 2022-07-11T15:16:18.000Z (almost 4 years ago)
- Default Branch: base
- Last Pushed: 2022-07-11T15:17:42.000Z (almost 4 years ago)
- Last Synced: 2024-12-20T16:20:17.633Z (over 1 year ago)
- Topics: html-css-javascript
- Language: CSS
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Uso de clases en CSS
[](https://postimg.cc/LJhnVkb6)
Cambiando estilos en CSS...
- Un boton en HTML permite cambiar el estilo de un elemento.
- Para esto, se utiliza el evento [**addEventListener**](https://www.w3schools.com/jsref/met_document_addeventlistener.asp) para modificar el valor de una variable y modificar la clase del elemento **body**.
- En CSS se define el color de fondo y el color de texto para la clase ```theme-x``` correspondiente al **body** de la página.