css实现悬浮三维翻转导航条效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现悬浮三维翻转导航条效果代码

代码标签: 三维 翻转 导航 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>

<style>
	* {
		margin: 0;
		padding: 0;
	}
	.w {
		width: 1200px;
		margin: 140px auto;
	}
	.nav_menu {
		display: flex;
		justify-content: space-around;
		align-items: center;
		height: 50px;
		/* background-color: #4caf50; */
		/* border: 1px solid #ccc; */
		padding: 10px;
		color: #fff;
		
	}
	.menu_item {
		position: relative;
		flex: 1;
		height: 100%;
		line-height: 50px;
		text-align: center;
		transform-style: preserve-3d;
		transition: all 0.5s;
		/* margin: 0 5px; */
	}
	.menu_item:hover {
		cursor: pointer;
		transform: rotateX(90deg);
	}
	.home, .web_home {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		perspective: 300px;
	}
	.home {
		background-color: #4caf50;
		z-index: 11;
		transform: translateZ(25px);
	}
	.web_home {
		background-color: #009688;
		transform: translateY(25px) rotateX(-90deg);
	}
</style>

</head>
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0