一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

html滑动仿悬浮球菜单效果如何实现 html滑动仿悬浮球菜单效果实现代码

时间:2021-03-05 编辑:袖梨 来源:一聚教程网

html滑动仿悬浮球菜单效果如何实现?本篇文章小编给大家分享一下html滑动仿悬浮球菜单效果实现代码,文章代码介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。

css样式

html,body{
	width: 100%;
	height: 100%;
	margin: 0;padding: 0;
}

/*导航图标*/
.NMH-g-navicon{
	position: fixed;
	top: 40%;
	right: 020px;
	
	
}
.NMH-g-navicon.Jnmh-onleft{
	right: auto;
	left: 020px;
}
/*导航图标logo按钮*/
.NMH-g-navicon .Jnmh-btnlogo{
	position: absolute;
	display: block;
	
	
	top: 50%;
	right: 0;
	margin-top: -50px;
	border: 0;
	background: url(img/icon_128.png) no-repeat center center;
    background-size: 95% 95%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 10px 0px;
	outline: none;
	border-radius: 50%;
	z-index: 1;
}
.NMH-g-navicon .Jnmh-btnlogohover{
	position: absolute;
	display: block;
	
	
	top: 50%;
	right: 0;
	margin: 0;padding: 0;
	margin-top: -50px;
	border: 0;
	overflow: hidden;
	/*background-color: red;*/
}

/*导航图标logo按钮-鼠标经过*/
.NMH-g-navicon.Jnmh-open .Jnmh-btnlogohover{
	margin-top: -150px;	
	
	
	border-radius: 150px 0 0 150px;
}
.NMH-g-navicon.Jnmh-onleft .Jnmh-btnlogohover{
	left: 0;
	right: auto;
	border-radius: 0 150px 150px 0;
}
/*导航图标菜单子容器*/
.NMH-g-navicon .Jnmh-m-submenu{
	position: absolute;
	background-color: transparent;
	list-style: none;
	top: -020px;
	bottom: -020px;
	left: -020px;
	right: -020px;
	margin: 0;
	padding: 0;
}

.NMH-g-navicon .Jnmh-m-submenu .Jnmh-subli{
	position: absolute;
	width: 100%;height: 100%;
	transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transition: all 0.8s ease-in-out;
}

.Jnmh-m-submenu .Jnmh-subdl{
	position: absolute;
    left: 50%;
    bottom: 100%;
    width: 0;
    height: 0;
    line-
    margin-left: 0;
    background: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 1px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.8s ease-in-out, color 0.1s, background 0.1s;
}
/*导航图标-展开菜单时*/
.NMH-g-navicon.Jnmh-open .Jnmh-m-submenu .Jnmh-subdl{
	
    
    line-
    margin-left: -40px;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}
/*导航图标-三级菜单容器*/
.NMH-g-navicon.Jnmh-open .Jnmh-m-submenu .Jnmh-subdd{
	position: absolute;
	line-height: normal;
}

html代码

  • 电商平台
  • 选品平台
  • 会员升级
  • 产品操作
  • 个人中心

javascript代码


热门栏目