css实现鼠标悬浮翻转菜单效果代码
代码语言:html
所属分类:悬停
代码描述:css实现鼠标悬浮翻转菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; } body { background: #262626; } ul { position: absolute; top: 50%; left: 50%; width: 80%; transform: translate(-50%, -50%); text-align: center; } ul li { display: inline-block; transform-style: preserve-3d; margin: 5px 5px; } ul li a { color: #262626; font-size: 16px; text-decoration: none; text-transform: uppercase; display: block; position: relative; } ul li a span { display: block; padding: 15px 20px; } ul li a span:before { content: attr(title); position: absolute; top: 0; left: 0; background: #e5202b; color: #fff; padding: 15px 20px; transform-style: preserve-3d; transform: rotateX(90deg) translateY(50px); transform-origin: bottom; transition: all 0.3s ease; } ul li a span:hover:before { transform: r.........完整代码请登录后点击上方下载按钮下载查看
网友评论0