Vertical Navigation Bar
Vertical Navigation Bar
수직 탐색 모음을 만들려면 위 코드와 함께 목록 안의 <a> 요소의 스타일을 지정할 수 있습니다.
li a {
display: block;
width: 60px;
}
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li a {
display: block;
width: 60px;
background-color: #dddddd;
}
</style>
</head>
<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
<p>A background color is added to the links to show the link area.</p>
<p>Notice that the whole link area is clickable, not just the text.</p>
</body>
</html>
A background color is added to the links to show the link area.
Notice that the whole link area is clickable, not just the text.
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 60px;
}
li a {
display: block;
background-color: #dddddd;
}
</style>
</head>
<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
<p>A background color is added to the links to show the link area.</p>
<p>Notice that the whole link area is clickable, not just the text.</p>
</body>
</html>
예제 설명 :
display: block; - 링크 요소를 블록 요소로 표시하면 텍스트뿐만 아니라 전체 링크 영역을 클릭 할 수있게되고 너비 (및 패딩, 여백, 높이 등)를 지정할 수 있습니다.
width: 60px;- 블록 요소는 기본적으로 사용 가능한 전체 폭을 차지합니다. 우리는 60 픽셀 너비를 지정하려고합니다.
<ul>의 너비를 설정하고 <a>의 너비를 제거 할 수 있습니다. 블록 요소로 표시 될 때 사용할 수있는 전체 너비를 차지하기 때문입니다. 이것은 앞의 예와 같은 결과를 낳습니다.
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 60px;
}
li a {
display: block;
}
A background color is added to the links to show the link area.
Notice that the whole link area is clickable, not just the text.
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 3168 | |
| 3167 | |
| 3166 | |
| 3165 |
HTML
HTML5 로컬 저장소
|
| 3164 |
HTML
HTML5 드래그 앤 드롭
|
| 3163 | |
| 3162 |
HTML
YouTube 동영상 ID
|
| 3161 |
HTML
HTML 도우미 (플러그인)
|
| 3160 | |
| 3159 |
HTML
HTML5 비디오
|
| 3158 |
HTML
HTML 멀티미디어 오디오 형식
|
| 3157 |
HTML
HTML 멀티미디어
|
| 3156 |
기타
Google 아이콘
|
| 3155 |
기타
부트 스트랩 아이콘
|
| 3154 |
기타
아이콘을 추가하는 방법
|
| 3153 | |
| 3152 |
반응형
부트 스트랩 <abbr>
|
| 3151 |
반응형
부트 스트랩 <mark>
|
| 3150 | |
| 3149 |
반응형
부트 스트랩의 기본 설정
|
| 3148 |
반응형
부트 스트랩 그리드 시스템
|
| 3147 |
CSS
왼쪽에 툴팁 나오게 하는 소스
|
| 3146 | |
| 3145 |
CSS
css를 이용한 툴팁만들기
|
| 3144 | |
| 3143 | |
| 3142 | |
| 3136 |
CSS
css 이미지 갤러리
|
| 3135 |
CSS
CSS 드롭 다운
2
|
| 3134 |
CSS
css 기본 툴팁
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기