Get Theme from URL Parameter and enable CSS theme
var head = document.getElementsByTagName('HEAD')[0];
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const theme = urlParams.get('theme')
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'src/css/themes/' + theme + '.css';
head.appendChild(link);
console.log(theme + " theme enabled!");
Also in CSS:
- underline text css
- how to add css for ::before event in jquery
- responsive images css
- how to include one css file in another
- how to add image with url in css
- css stylesheet template
- como fazer placeholder que vira label
- focus um elemento altera outro css
- css center div
- kerning css
- css blur background
- how to change svg image color on hover using css
- kotlin exit app
- text overflow ellipsis css
- background color
- pestañas dentro de una pagina web php
- how to write css in html
- css image fit in div with aspect ratio
- css flex content right
- ram
- edge ontouchmove does not work correctly
- how to change the page background in css
- font-weight css
- css change text