css实现菜单点击标注效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现菜单点击标注效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .menu { background: #efefff; color: #000; border-radius: 4px; width: 280px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4); overflow: hidden; } .menu-item { padding: 20px; cursor: pointer; transition: background 0.15s ease-out; position: relative; z-index: 1; } .menu-item:before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; z-index: -1; width: 0%; } .menu-item:hover { background: #e2e2fb; } .menu .selected { transition: border 0.1s 0.15s ease; border-right: 7px solid #6394ff; } .menu .selected:before { background: #fff; transition: width 0.05s 0.02s ease-in-out; width: 100%; } html { transform: scale(1.5); overflow: hidden; } .container { display: flex; justify-content: center; align-items: center; height: 100vh; background: #3b70fc; flex-direction: column; } </style> </head&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0