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/ionicons.min.css"> <style> .plus { width: 100px; cursor: pointer; transition: all 0.3s ease 0s; height: 100px; background: #ffe581; border-radius: 50%; display: flex; position: relative; } .plus__line { width: 6px; height: 50px; background: #000; border-radius: 10px; position: absolute; left: calc(50% - 3px); top: calc(50% - 25px); } .plus__line--h { transform: rotate(90deg); } .plus__line--v { display: flex; align-items: center; justify-content: space-around; overflow: hidden; transition: all 0.4s ease 0s; } .plus__link { color: #fff; font-size: 30px; opacity: 0; visibility: hidden; transition: 0.3s ease 0s; transform: scale(0.5); } .plus--active { height: 32px; border-radius: 30px; } .plus--active .plus__line--v { height: 68px; top: calc(-100% - 60px); padding: 0 5px; box-sizing: border-box; width: 220px; border-radius: 60px; left: calc(50% - 110px); } .plus--active .plus__link { opacity: 1; visibility: visible; transform: scale(1); transition-delay: 0.05s; } .centered { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; } html, body { height: 100%; } body { background-color: #ffffff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s.........完整代码请登录后点击上方下载按钮下载查看
网友评论0