当前位置: 首页 > 图文教程 > 网页特效 > 网页文字特效 > css制作的有弹动效果的网页导航
No. « 1 2 › »
关键字
发了个韩国网站(www.firstkids.co.kr)给我,让我用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=gb2312" /> <title>这是一个导航</title> <style type="text/css"> #nav{ list-style:none; margin:0; padding:5px 0 0 0; background:#F0F0F0; } #nav li{ float:left; display:inline; margin-right:2px; } #nav a{ float:left; width:81px; height:28px; text-align:center; background:url(http://www.ruanchen.com/'宋体'; color:#FFF; text-decoration:none; } #nav a:hover{ line-height:28px; background-position:0; } </style> </head> <body> <ul id="nav"> <li><a href="http://www.ruanchen.com/"CURSOR: hand" onfocus="this.blur()" onclick="runEx('code')" type="button" value="运行代码" /> [ 提示:你可先修改部分代码,再按Ctrl+A 全部选择 ]
登陆 还没注册?