JavaScript로 배치된 요소의 하단 위치를 설정하려면 하단 재산.
예시
아래 코드를 실행하여 맨 아래 위치를 설정하는 방법을 배울 수 있습니다. −
<!DOCTYPE html>
<html>
<head>
<style>
#newBtn {
position: absolute;
}
</style>
</head>
<body>
<button type="button" id="newBtn" type="button" onclick="display()">Set Bottom Position</button>
<script>
function display() {
document.getElementById("newBtn").style.bottom = "400px";
}
</script>
</body>
</html>