鼠标经过显示菜单

Posted ince

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鼠标经过显示菜单相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>隐藏页面左侧标签导航栏 - 源码之家</title>
<style type="text/css">
a:link,a:hover,a:visited,a:active {color: #fff;text-decoration: none;}
body {height: 100%;width: 100%; margin: 0; padding: 0; background: #fff;}
.card-holder {position: fixed;width: 0px;overflow: visible;}
.card-wrapper {display: inline-block;float: right;clear: both;}
.card {
position: relative;
left: 32px;
padding: 16px 32px 16px 64px;
margin: 8px;
x-box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.5);
box-shadow: 8px 0 8px -8px rgba(0, 0, 0, 0.5);
background: #fff;
transition: all 0.3s ease-in-out 0.1s;
}
.card:hover {position: relative;left: 100%; margin-left: -32px; box-shadow:0 -8px 8px -8px rgba(0, 0, 0, 0.5),0 8px 8px -8px rgba(0, 0, 0, 0.5); transition: all 0.3s ease-in-out;}
.card-content {display: inline-block;color: #fff;font-family: ‘Droid Sans‘, sans-serif; font-size: 16px;font-weight: bold;white-space: nowrap;}
.bg-01 { background: #539770; }
.bg-02 { background: #4B7D74; }
.bg-03 { background: #8DC2BC; }
.bg-04 { background: #EDD6B4; }
.bg-05 { background: #BE7467; }
.bg-06 { background: #E2AE63; }
</style>
</head>

<body>

<div class=‘card-holder‘>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-01‘>
<span class=‘card-content‘>item #1</span>
</div>
</a>
</div>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-02‘>
<span class=‘card-content‘>long menu item #2</span>
</div>
</a>
</div>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-03‘>
<span class=‘card-content‘>menu item #3</span>
</div>
</a>
</div>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-04‘>
<span class=‘card-content‘>item #4</span>
</div>
</a>
</div>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-05‘>
<span class=‘card-content‘>menu item #5</span>
</div>
</a>
</div>
<div class=‘card-wrapper‘>
<a href=‘#‘>
<div class=‘card bg-06‘>
<span class=‘card-content‘>long menu item #1</span>
</div>
</a>
</div>
</div>
</body>
</html>











































































以上是关于鼠标经过显示菜单的主要内容,如果未能解决你的问题,请参考以下文章

jQuery 如何实现 “鼠标悬浮下拉菜单” 效果?

electron鼠标经过托盘显示自定义菜单

jQuery的hover事件,鼠标经过能显示子菜单,移出就不能隐藏子菜单。代码如下

鼠标经过显示菜单

为啥css做的二级导航,当鼠标停留在一级上时候,二级菜单正常显示。当鼠标移动到二级菜单,

HTML中鼠标悬浮时的下拉菜单用CSS怎么做