CSS Height and Width > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

CSS Height and Width 정보

CSS CSS Height and Width

본문

CSS Height and Width

 

Setting height and width

 

height 및 width 속성은 요소의 높이 및 너비를 설정하는 데 사용됩니다.

 

높이와 너비를 자동으로 설정할 수 있습니다 (기본값 : 브라우저가 높이와 너비를 계산한다는 의미). 또는 px, cm 등의 길이 값 또는 포함 된 블록의 백분율 (%)로 지정합니다. .

 

Example

div {

    height: 200px;

    width: 50%;

    background-color: powderblue;

}

 

459db5a1ca36a3d0b0e5b6881532a43b_1486130539_8461.PNG
 

 

<!DOCTYPE html>

<html>

<head>

<style>

div {

    height: 200px;

    width: 50%;

    background-color: powderblue;

}

</style>

</head>

<body>

 

<h2>Set the height and width of an element</h2>

 

<p>This div element has a height of 200px and a width of 50%:</p>

 

<div>This element has a height of 100 pixels and a width of 500 pixels.</div>

 

</body>

</html>


추천
0

댓글 0개

전체 1,264
퍼블리셔팁 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT