css+div实现三维立体菜单悬浮效果代码
代码语言:html
所属分类:菜单导航
代码描述:css+div实现三维立体菜单悬浮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; } body { display: flex; justify-content: center; align-items: center; color: #9BA4B5; background-color: #9DB2BF; } .list { list-style-type: none; } .list-item { padding: 1rem 2rem; background-color: #394867; text-transform: uppercase; letter-spacing: 0.2rem; position: relative; transition: all 0.4s; cursor: pointer; } .list-item::before { position: absolute; content: ""; width: 30px; height: 50px; background-color: #212A3E; transform: skewY(45deg); left: -30px; top: -15px; z-index: -2; } .list-item::after { position: absolute; content: ""; background-color: #212A3E; width: 100%; height: 30px; right: 0px; top: -30px; transform-origin: bottom; transform: skewX(45deg); z-index: -1;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0