Java Script & DOM/HTML DOM

DOM Style 객체 (CSS 관련 객체)

본클라쓰 2009. 10. 26. 14:13

style 객체

document.getElementById("id").style.속성 = "값";




속성

background-color : Object.style.backgroundColor = "#00ff00";


border : Object.style.border = "3px solid blue";


height : Object.style.height = "50px";

width : Object.style.width = "50px";


font : Object.style.font = "bold 12px arial";


display : Object.style.display = "block";

float : Object.style.cssFloat = "left";

overflow : Objec.style.overflow = "scroll";

position : Object.style.position = "absolute";


visibility : Object.styel.visiblity = "hidden";

z-index : Object.style.zIndex = "1";