CSS 制作菜单栏
1、如何用ul制作一行菜单
<body>
<ul>
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
<li><a href="#">Link three</a></li>
<li><a href="#">Link four</a></li>
</ul>
<p>
样式:
<style type="text/css">
ul{
float:left;margin:auto;padding:auto;width:800px;list-style-type:none;
}
ul li{
display:inline;
}
ul li a{
float:left;padding-left:10px;padding-right:10px;color:#00FF00;background-color:#6600FF;text-decoration:none;border-right:1px solid white
}
a.hover{
background-color:#CC0099;
}
</style>
关键点:display:inline----使得li能连接在一起,以前一直设置li float:left,太麻烦了。
相关文档:
在许多网站上我们可以看到很个性的鼠标指针(cursor),在网页设计中用CSS可以方便的实现这样个性鼠标指针的效果,该CSS属性就是"cursor"属性。
首先我们介绍一下系统自带的15个鼠标效果:
一般而言,鼠标以斜向上的箭头显示,移到文本上时变为有头的竖线,移到超级链接上变为手型。但用css可控制鼠标的显示效果,如可使鼠标 ......
<!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=gbk" />
......
png透明 AlphaImageLoader
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=bEnabled,sizingMethod=sSize,src=sURL)
enabled:可选项。布尔值(Boolean)。设置或检索滤镜是否激活。true:默认值。滤镜激活。false:滤镜被禁止。
sizingMethod:可选项。字符串(String)。设置或检索滤镜作用的对象的图 ......
链接方法:
外部链接样表:<head><link rel="stylesheet" type="text/css" href="*.css"></head>
内部的:1:<head><style type="text/css"> example css </style></head>
&nbs ......