设为首页收藏本站关注微信<<< 抵制 IE6 人人有责 >>>
搜索
热搜: 活动 交友 discuz
查看: 534|回复: 0

[Html] 纯CSS3制作鼠标经过动画菜单效果

[复制链接]
发表于 2017-3-20 22:22:09 | 显示全部楼层 |阅读模式
[HTML] 纯文本查看 复制代码
<!doctype html>
<html>
<head>
<title>纯CSS3制作鼠标经过动画菜单效果</title>
<meta charset="utf-8">
<style type="text/css">
 *{margin:0px;padding:0px;}
 #nav{width:280px;height:500px;margin:50px;perspective:400px;float:left;}
 #nav p{height:40px;width:200px;font-size:18px;font-family:"微软雅黑";text-align:center;line-height:40px;}
 #nav ul li{width:200px;height:40px;list-style:none;position:relative;transform-style:preserve-3d;transition:0.5s;
 	display:block;margin:1px;cursor:pointer;}
 #nav ul li:hover{transform:translateZ(30px) rotateX(360deg) scale(1.1);}
 #nav ul li div:nth-child(1){height:40px;width:200px;background:#f96;}
 #nav ul li div p{font-size:16px;font-family:"微软雅黑";text-align:center;line-height:40px;}

 #nav1{width:280px;height:500px;margin:50px;perspective:400px;float:left;}
 #nav1 p{height:40px;width:200px;font-size:18px;font-family:"微软雅黑";text-align:center;line-height:40px;}
 #nav1 ul li{width:200px;height:40px;list-style:none;position:relative;transform-style:preserve-3d;transition:0.5s;display:block;margin:1px;cursor:pointer;}
 #nav1 ul li div:nth-child(1){height:40px;width:200px;background:#f96;}
 #nav1 ul li div p{font-size:16px;font-family:"微软雅黑";text-align:center;line-height:40px;}
 #nav1 ul li:hover{transform:translateZ(30px) scale(1.1);}

 #nav2{width:280px;height:500px;margin:50px;perspective:400px;float:left;}
 #nav2 p{height:40px;width:200px;font-size:18px;font-family:"微软雅黑";text-align:center;line-height:40px;}
 #nav2 ul li{width:200px;height:40px;list-style:none;position:relative;transform-style:preserve-3d;transition:0.5s;display:block;margin:1px;cursor:pointer;}
 #nav2 ul li div:nth-child(1){height:40px;width:200px;background:#f96;}
 #nav2 ul li div p{font-size:16px;font-family:"微软雅黑";text-align:center;line-height:40px;}
 #nav2 ul li:hover{transform:rotateY(360deg) scale(1.1);}
</style>
</head>
<body>
<div id="nav">
	<ul>
		<li>
		<div><p>Home</p></div></li>
		<li>
		<div><p>javascript</p></div></li>
		<li>
		<div><p>div+css</p></div></li>
		<li>
		<div><p>Tel</p></div></li>
		<li>
		<div><p>Abouet</p></div></li>
	</ul>
	<p>前后翻转</p>
</div>
<div id="nav1">
	<ul>
		<li>
		<div><p>Home</p></div></li>
		<li>
		<div><p>javascript</p></div></li>
		<li>
		<div><p>div+css</p></div></li>
		<li>
		<div><p>Tel</p></div></li>
		<li>
		<div><p>Abouet</p></div></li>
	</ul>
	<p>上浮</p>
</div>
<div id="nav2">
	<ul>
		<li>
		<div><p>Home</p></div></li>
		<li>
		<div><p>javascript</p></div></li>
		<li>
		<div><p>div+css</p></div></li>
		<li>
		<div><p>Tel</p></div></li>
		<li>
		<div><p>Abouet</p></div></li>
	</ul>
	<p>左右翻转</p>
</div>

<div style="text-align:center;margin:10px 0; font:normal 14px/24px 'MicroSoft YaHei';clear:both;">
<p>适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p>
</div>
</body>
</html>

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Archiver|源于生活(个人生活娱乐工作的笔记)css3,html5,学习笔记    

GMT+8, 2019-8-23 04:27 , Processed in 0.218750 second(s), 28 queries .

Powered by Mr.Kevin-ying

© 2004-2015

快速回复 返回顶部 返回列表