Helper House (Bkjia.com) Webpage creation tutorialYou are welcome to continue learning about CSS. This article uses the CSS style as an example to create a very beautiful website navigation menu. The Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head> <meta http-equiv =" Content-Type "content =" text/html; charset = gb2312 "/> <title> www.bkjia.com </title> <style type =" text/css "> * {font-size: 12px; text-align: center ;} body {background: # f0f0f0;} # nav {width: 700px; margin: 20px auto 0 auto; background: # f60; padding: 8px 12px;} # nav li {display: inline; list-style-type: none;} # nav li a: link, # nav li a: visited {float: left; margin-right: 8px; padding: 2px 5px; text-decoration: none; color: # fff; border: 1px solid # f60; }# nav li a: hover {color: # ff0; border: 1px solid # fff ;} # nav li a # current {color: # c00; border: 1px solid # fff; background: # fff ;} </style>
Tip: the code can be modified before running!