BLOG main image
분류 전체보기 (313)
교육 (13)
NEIS (6)
Edufine (0)
Programmer (5)
Android Programming (1)
Internet W3 (18)
JAVA Programming (9)
JSP/Servlet (1)
Framework (7)
Spring For Beginner (4)
eGovFrame (10)
MEAN Stack (2)
NodeJS (5)
SublimeText (30)
SublimeText_Tips (18)
Eclipse (16)
JavaScript (8)
jQuery (12)
jQuery_tips (1)
Ajax (3)
DWR(Direct Web Remote) (4)
JSON(JS Object Notation) (4)
Oracle (2)
MySQL (28)
OS (16)
Download (3)
Life (10)
Favorit Site (1)
Books (2)
Healthy (1)
Stocks (1)
HTML5/CSS (1)
Python (4)
Security (7)
CISSP (0)
Ruby On Rails (5)
일기장 (0)
영어 교과서(중2) (3)
알고리즘 (0)
Go Lang (3)
VB 2010 (12)
C# (1)
정보보안기사(네트워크보안) (0)
업무 활용 엑셀 (11)
틈틈이 활용팁 (14)
하루 하루 살아가며 ……. (2)
기술 (1)
파이썬 & 데이터분석 (1)
Visitors up to today!
Today hit, Yesterday hit
daisy rss
tistory 티스토리 가입하기!
2015. 8. 4. 09:22

출처 : http://www.w3schools.com/css/css_navbar.asp

 

Navigation Bars

Having easy-to-use navigation is important for any web site.

With CSS you can transform boring HTML menus into good-looking navigation bars.


Navigation Bar = List of Links

A navigation bar needs standard HTML as a base.

In our examples we will build the navigation bar from a standard HTML list.

A navigation bar is basically a list of links, so using the <ul> and <li> elements makes perfect sense:

 

Example

 

<!DOCTYPE html>
<html>
<head>
<style>
ul {
     list-style-type:none;
     margin: 0;
     padding: 0;
}

li {
     float:left;   //  li 목록을 수평화 한다.
}

a:link, a:visited {
     display: block;
     width: 120px;
     background-color: yellowgreen;
     color: white;
     text-decoration: none;
     text-align: center;
     font-weight: bold;
     text-transform: upppercase;
     padding: 5px;
}
a:hover, active {
     background-color: green
}
</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>

</body>
</html

 

 

Else CSS

 

<style>
  table, th , td {
      border: 1px solid grey;
      border-collapse: collapse;
      padding: 5px;
  }
  table tr:nth-child(odd) {
      background-color: #f1f1f1;
  }
  table tr:nth-child(even) {
      background-color: #ffffff;
  }
</style>
 

 

반응형