css实现一个带图标下拉折叠菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现一个带图标下拉折叠菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <title></title> <style> ul { padding: 0; margin: 0; } li { list-style-type: none; } input[type='radio'] { display: none; } label { cursor: pointer; } ::-webkit-scrollbar { display: none; } body { height: 100vh; font-weight: 500; font-family: 'Roboto', sans-serif; background: linear-gradient(135deg, #8254ea 0%, #e86dec 100%); -webkit-font-smoothing: antialiased; font-size: 12px; } .swanky_wrapper { width: 225px; height: auto; overflow: hidden; border-radius: 4px; background: #2a394f; margin:60px auto; } .swanky_wrapper label { padding: 25px; float: left; height: 72px; border-bottom: 1px solid #293649; position: relative; width: 100%; color: #eff4fa; transition: text-indent 0.15s, height 0.3s; box-sizing: border-box; } .swanky_wrapper label img { margin-right: 10px; position: relative; top: 2px; width: 16px; } .swanky_wrapper label span { position: relative; top: -3px; } .swanky_wrapper label:hover { background: #212e41; border-bottom: 1px solid #2a394f; text-indent: 4px; } .swanky_wrapper label:hover .bar { width: 100%; } .swanky_wrapper .........完整代码请登录后点击上方下载按钮下载查看
网友评论0