bottom 예제
<style> #hz { position: absolute; width: 500px; height: 100px; background-color: coral; color: white; } </style> <button onclick="homzzang()">클릭</button> <div id="hz"><h1>홈짱닷컴 Homzzang.com</h1></div> <script> function homzzang() { document.getElementById("hz").style.bottom = "10px"; } </script> 결과보기
<style>
#hz {
position: absolute;
width: 500px;
height: 100px;
background-color: coral;
color: white;
}
</style>
<button onclick="homzzang()">클릭</button>
<div id="hz"><h1>홈짱닷컴 Homzzang.com</h1></div>
<script>
function homzzang() {
document.getElementById("hz").style.bottom = "10px";
</script>
결과보기