div+css实现左侧悬浮伸缩菜单代码
代码语言:html
所属分类:菜单导航
代码描述:div+css实现左侧悬浮伸缩菜单代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; } html { font-size: 14px; } body { width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Montserrat', sans-serif, Arial, 'Microsoft Yahei'; background-image: linear-gradient(to left bottom, #d87a00, #f46246, #fa557c, #e75eaf, #bc74d7, #9487eb, #6197f4, #00a3f3, #00afed, #00b9e0, #00c0cf, #2ac6bc); /* 指定背景图像的大小 */ background-size: 200%; /* 执行动画:动画名 时长 线性的 无限次播放 */ animation: bgAnimation 30s linear infinite; } /* 定义动画 */ @keyframes bgAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .side { position: fixed; width: 120px; height: 180px; left: 0; top: 35%; z-index: 3; } .side .icon { position: relative; width: 120px; height: 60px; margin-bottom: 6px; display: flex; justify-content: center; align-items: center; } .side .icon::after { position: absolute; content: ''; width: 120px; height: 60px; top: 0; left: 0; background-color: #ffffff; z-index: -1; } .side .icon:nth-child(1)::aft.........完整代码请登录后点击上方下载按钮下载查看
网友评论0