css实现极简旋转切换菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现极简旋转切换菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.0.css"> <style> *, ::before, ::after { margin: 0; padding: 0; box-sizing: border-box; } body { height: 100vh; display: flex; justify-content: center; align-items: center; background-color: #e5e5e5; } .menu-switcher-container { position: relative; width: 12.5em; height: 5em; border-radius: 7em; background-color: #f5f5f5; box-shadow: 0 0 0.5em rgb(190, 190, 190); cursor: pointer; overflow: hidden; transition: all 350ms ease-in-out; } .menu-switcher-container:hover { box-shadow: 0 0 1em rgb(190, 190, 190); transform: scale(0.97); } .down-arrow { position: absolute; height: 100%; width: 3em; /* border: 1px solid red; */ right: 0; display: grid; place-items: center; font-size: 1.55em; color: #aaa; } .menu-switcher-container:hover .down-arrow { color: #444444; } .menu { position: absolute; /* border: 1px solid red; */ width: 5em; height: 5em; border-radius: 50%; left: -2.5em; transition: transform 500ms ease-in-out; } .menu .ite.........完整代码请登录后点击上方下载按钮下载查看
网友评论0