스타일 조작하기

sujeong kim·2021년 6월 4일
0
// Set multiple styles in a single statement
elt.style.cssText = "color: blue; border: 1px solid black";
// Or
elt.setAttribute("style", "color:red; border: 1px solid blue;");

// Set specific style while leaving other inline style values untouched
elt.style.color = "blue";

https://developer.mozilla.org/ko/docs/Web/API/ElementCSSInlineStyle/style

profile
개발자

0개의 댓글