css+js模拟windows9x电脑桌面操作效果代码
代码语言:html
所属分类:其他
代码描述:css+js模拟windows9x电脑桌面操作效果代码,包括图标操作、开始菜单栏等。
代码标签: css js 模拟 windows 9x 桌面 操作
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html, body { margin: 0; padding: 0; box-sizing: border-box; background-color: #54A8A8; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 12px; width: 100%; height: 100%; overflow: hidden; } *, *::before, *::after { box-sizing: inherit; } svg { display: block; } .desktop { display: grid; user-select: none; position: relative; width: 100%; height: 100%; } .short-cuts { margin-bottom: 28px; } .short-cut { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 2px; width: 72px; } .short-cut .icon { margin-bottom: 6px; } .short-cut .text { text-align: center; color: #FFFFFF; border: 1px solid transparent; } .short-cut.selected .text { background-color: #0000A8; border: 1px dotted #FCFC00; } .window { position: absolute; border-top: 1px solid #DFDFDF; border-left: 1px solid #DFDFDF; border-bottom: 1px solid #000000; border-right: 1px solid #000000; } .window.minimized { display: none; } .window .restore-icon { display: none; } .window.maximized { top: 0 !important; left: 0 !important; width: 100% !important; height: calc(100% - 28px) !important; border-top: 0; border-left: 0; border-bottom: 0; border-right: 0; } .window.maximized .frame { border-top: 0; border-left: 0; border-bottom: 0; border-right: 0; padding: 0; } .window.maximized .maximize-icon { display: none; } .window.maximized .restore-icon { display: block; } .window .frame { background: #BFBFBF; border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-bottom: 1px solid #7F7F7F; border-right: 1px solid #7F7F7F; padding: 2px; width: 100%; height: 100%; display: flex; flex-direction: column; } .window .content-bevel { border-top: 1px solid #7F7F7F; border-left: 1px solid #7F7F7F; border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; flex-grow: 1; height: calc(100% - 20px); } .window .content { border-top: 1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #DFDFDF; border-right: 1px solid #DFDFDF; background-color: #FFFFFF; height: 100%; padding: 0 8px; overflow: auto; } .window.active .title-bar { background-color: #0000A8; } .window.active .title-bar .title { color: #FFFFFF; } .window .grab { position: absolute; } .window .n-grab { top: -1px; left: 3px; right: 3px; height: 4px; cursor: ns-resize; } .window .ne-grab { top: -1px; right: -1px; width: 4px; height: 4px; cursor: nesw-resize; } .window .e-grab { top: 3px; right: -1px; bottom: 3px; width: 4px; cursor: ew-resize; } .window .se-grab { bottom: -1px; right: -1px; width: 4px; height: 4px; cursor: nwse-resize; } .window .s-grab { bottom: -1px; left: 3px; right: 3px; height: 4px; cursor: ns-resize; } .window .sw-grab { bottom: -1px; left: -1px; width: 4px; height: 4px; cursor: nesw-resize; } .window .w-grab { left: -1px; top: 3px; bottom: 3px; width: 4px; cursor: ew-resize; } .window .nw-grab { top: -1px; left: -1px; width: 4px; height: 4px; cursor: nwse-resize; } .title-bar { background-color: #7F7F7F; padding: 1px 2px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; } .title-bar .title { margin-left: 3px; flex-grow: 1; color: #BFBFBF; font-weight: bold; } .title-bar .button { padding: 0; background: #BFBFBF; border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-bottom: 1px solid #000000; border-right: 1px solid #000000; } .title-bar .button .bevel { border-top: 1px solid #DFDFDF; border-left: 1px solid #DFDFDF; border-bottom: 1px solid #7F7F7F; border-right: 1px solid #7F7F7F; } .title-bar .button.close { margin-left: 2px; } .title-bar .button:active { border-top: 1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; } .title-bar .button:active svg { position: relative; top: 1px; left: 1px; } .title-bar .button:active .bevel { border-top: 1px solid #7F7F7F; border-left: 1px solid #7F7F7F; border-bottom: 1px solid #BFBFBF; border-right: 1px solid #BFBFBF; } .title-bar.animating { position: absolute; transition: all 200ms linear; background-color: #0000A8; z-index: 1000; } .title-bar.animating .title { color: #FFFFFF; } .title-bar.animating .button { display: none; } .task-bar { position: absolute; bottom: 0; left: 0; right: 0; background-color: #C0C7C8; height: 28px; border-top: 1px solid #C0C7C8; z-index: 1000; } .task-bar > .bevel { border-top: 1px solid #FFFFFF; padding: 2px; display: flex; } .task-bar .start-button { border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-bottom: 1px solid #000000; border-right: 1px solid #000000; background-color: #C0C7C8; display: flex; padding: 0; font-size: 11px; } .task-bar .start-button .bevel { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #87888F; border-right: 1px solid #87888F; background-color: #C0C7C8; padding: 2px 3px 3px 3px; } .task-bar .start-button .icon { margin-right: 3px; } .task-bar .start-button.active { border-top: 1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; } .task-bar .start-button.active .bevel { border-top: 1px solid #.........完整代码请登录后点击上方下载按钮下载查看
网友评论0