mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
18 lines
319 B
HTML
18 lines
319 B
HTML
|
<!doctype html>
|
||
|
<div></div>
|
||
|
<script>
|
||
|
let setStyle = (el, props) => {
|
||
|
for (prop in props)
|
||
|
el.style.setProperty(prop, props[prop]);
|
||
|
};
|
||
|
|
||
|
setStyle(document.querySelector('div'), {
|
||
|
all: 'initial',
|
||
|
'background-color': 'blue',
|
||
|
display: 'block',
|
||
|
width: '100px',
|
||
|
height: '100px',
|
||
|
padding: '10px'
|
||
|
});
|
||
|
</script>
|