페이지가로드 될 때 클래스 이름을 변경하는 간단한 javascript 명령입니다. 내가 뭘 잘못하고 있는거야? http://jsfiddle.net/wtH2Y/4/자바 스크립트로 css onload 변경
<html>
<head>
<style>
.away {
margin: 30px 0 0 0 !important;
position:fixed;
-webkit-transition: margin 0.6s;
-moz-transition: margin 0.6s;
-o-transition: margin 0.6s;
}
.in {
margin:0;
position:absolute;
}
</style>
<script>
window.onload = function pre-loader() {
document.getElementByClassName('away').className = 'in';
};
</script>
</head>
<div class="away">
this should slide up when the page loads
</div>
잘 알고 있습니다. 나는 getElementById를 고수 할 것입니다. 그리고 돌진을 붙잡아 주어서 고마워. smh –