CSS 下拉列表菜单。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication6.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
body {
width: 95%;
margin: 0px auto;
}
#header {
height: 50px;
width: 95%;
}
#nav {
position: absolute; /*菜单绝对定位*/
}
#nav > li {
list-style-type: none; /*去掉第一层li里面的符号*/
float: left; /*将第一层的li横向摆放*/
width: 100px; /*设置宽度*/
font-size: 30px; /*字体大小*/
background-color: #16b6fc; /*背景颜色*/
color: white; /*字体颜色*/
}
#nav > li > ul > li