how to change a Css Style Class definition with Javascript? -


this question has answer here:

is possible override css classes javascript ? exemple :

adding background .iframe style classe.

who troll

who down voted answer? please provide reason


changing style property

var iframe = document.queryselector('.iframe'); iframe.style['marginbottom'] = "200px"; 

changing class property

iframe['classname'] = "myclass"; 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -