滑动鼠标放大带阴影的纯CSS菜单

代码简介:这个菜单很特别,个性一点,当鼠标放到菜单的某一项的时候,该项会变大,像一些分页程序的效果一样,没有用到任何脚本,完全是由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>
<title>滑动鼠标放大带阴影的纯CSS菜单_网页代码站(www.webdm.cn)</title>
<style type="text/css">
#container {width:680px; height:230px; padding:20px 0 0 50px; background:url(bears.jpg); border:1px solid #000;}
#large {padding:0; margin:0; list-style:none;}
#large li {float:left; display:block; margin-right:5px; width:100px; height:25px;}
#large li a {display:inline; float:left; width:100px; height:25px; position:absolute; text-align:center; text-decoration:none;}
#large li a em {display:block; width:100px; height:25px; background:#874; border:1px solid #fff;}
#large li a b {display:block; width:100px; height:25px; background:transparent; color:#dd7; position:absolute; top:0; left:0; line-height:24px;}
#large li a:hover {white-space:normal; cursor:pointer; z-index:100;}
#large li a:hover em {display:block; width:115px; height:35px; left:7px; top:5px; position:absolute; background:#431; z-index:100; opacity:0.7;
 
border:0}
#large li a:hover b {width:110px; height:30px; top:-7px; left:-5px; z-index:200; background:#985; font-size:1.1em; color:#ff9; line-height:29px;
 
border:1px solid #fff;}
</style>
<style type="text/css">
#large li a:hover em {filter: alpha(opacity=70); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);}
</style>
</head>
<body>
 
<div id="container">
<ul id="large">
<li><a href="http://www.webdm.cn"><em></em><b>www.webdm.cn</b></a></li>
<li><a href="http://www.webdm.cn"><em></em><b>中文实例</b></a></li>
<li><a href="http://www.webdm.cn"><em></em><b>网页特效</b></a></li>
<li><a href="/"><em></em><b>最新更新</b></a></li>
<li><a href="/"><em></em><b>Goldilocks</b></a></li>
<li><a href="/"><em></em><b>Contact</b></a></li>
</ul>
</div>
 
</body>
</html>
<br>
<a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!

代码来自:http://www.webdm.cn/webcode/d3da9648-7d5e-4226-a799-2d38bb9fbd56.html

posted @   网页代码站  阅读(351)  评论(0编辑  收藏  举报
编辑推荐:
· 从二进制到误差:逐行拆解C语言浮点运算中的4008175468544之谜
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
· 从问题排查到源码分析:ActiveMQ消费端频繁日志刷屏的秘密
阅读排行:
· C# 13 中的新增功能实操
· Ollama本地部署大模型总结
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(4)
· langchain0.3教程:从0到1打造一个智能聊天机器人
· 2025成都.NET开发者Connect圆满结束
点击右上角即可分享
微信分享提示