height 속성을 사용하여 요소의 높이 조정
너비 속성과 유사하게 CSS의 height 속성을 사용하여 요소의 높이를 지정할 수 있습니다. 다음은 이미지의 높이를 20px로 변경하는 예입니다.
img { height: 20px; }
h4 태그에 height 속성을 추가하고 25px로 설정합니다.NOTE : 이 챌린지에서 테스트를 통과하려면 100% 확대/축소가 필요할 수 있습니다.
<style> h4 { text-align: center; height: 25px; } p { text-align: justify; } .links { margin-right: 20px; text-align: left; } .fullCard { width: 245px; border: 1px solid #ccc; border-radius: 5px; margin: 10px 5px; padding: 4px; } .cardContent { padding: 10px; } </style> <div class="fullCard"> <div class="cardContent"> <div class="cardText"> <h4>Google</h4> <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p> </div> <div class="cardLinks"> <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a> <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a> </div> </div> </div>
* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.