I'll create a comprehensive Windows 98 emulator with all the features you mentioned. This will be a complete implementation with a working desktop, filesystem, applications, and full interactivity.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Windows 98 Emulator</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
}
body {
font-family: 'MS Sans Serif', sans-serif;
font-size: 11px;
overflow: hidden;
background: #008080;
cursor: default;
}
.desktop {
width: 100vw;
height: 100vh;
background: linear-gradient(45deg, #008080 25%, transparent 25%),
linear-gradient(-45deg, #008080 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #008080 75%),
linear-gradient(-45deg, transparent 75%, #008080 75%);
background-size: 2px 2px;
background-position: 0 0, 0 1px, 1px -1px, -1px 0px;
position: relative;
}
.taskbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 30px;
background: #c0c0c0;
border-top: 1px solid #ffffff;
display: flex;
align-items: center;
z-index: 1000;
}
.start-button {
height: 26px;
padding: 0 20px;
background: #c0c0c0;
border: 2px outset #c0c0c0;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
margin: 2px;
}
.start-button:active {
border: 2px inset #c0c0c0;
}
.start-button.active {
border: 2px inset #c0c0c0;
}
.taskbar-apps {
flex: 1;
display: flex;
gap: 2px;
margin-left: 5px;
}
.taskbar-app {
height: 26px;
padding: 0 10px;
background: #c0c0c0;
border: 2px outset #c0c0c0;
cursor: pointer;
display: flex;
align-items: center;
max-width: 150px;
overflow: hidden;
white-space: nowrap;
}
.taskbar-app.active {
border: 2px inset #c0c0c0;
}
.system-tray {
margin-right: 5px;
padding: 0 10px;
height: 26px;
display: flex;
align-items: center;
border: 1px inset #c0c0c0;
background: #c0c0c0;
}
.desktop-icon {
position: absolute;
width: 64px;
height: 64px;
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
padding: 4px;
color: white;
text-shadow: 1px 1px 1px black;
}
.desktop-icon.selected {
background: rgba(0, 0, 128, 0.5);
border: 1px dotted white;
}
.desktop-icon img {
width: 32px;
height: 32px;
margin-bottom: 4px;
}
.desktop-icon span {
font-size: 10px;
text-align: center;
word-wrap: break-word;
max-width: 60px;
}
.window {
position: absolute;
background: #c0c0c0;
border: 2px outset #c0c0c0;
min-width: 200px;
min-height: 100px;
z-index: 100;
}
.window.active {
z-index: 200;
}
.window.minimized {
display: none;
}
.window-header {
height: 20px;
background: linear-gradient(90deg, #0000ff, #000080);
color: white;
display: flex;
align-items: center;
padding: 0 4px;
cursor: move;
font-weight: bold;
font-size: 11px;
}
.window.inactive .window-header {
background: linear-gradient(90deg, #808080, #404040);
}
.window-title {
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.window-controls {
display: flex;
gap: 2px;
}
.window-control {
width: 16px;
height: 14px;
background: #c0c0c0;
border: 1px outset #c0c0c0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 8px;
font-weight: bold;
}
.window-control:active {
border: 1px inset #c0c0c0;
}
.window-content {
padding: 4px;
height: calc(100% - 20px);
overflow: auto;
}
.start-menu {
position: fixed;
bottom: 30px;
left: 0;
width: 200px;
background: #c0c0c0;
border: 2px outset #c0c0c0;
display: none;
z-index: 1001;
}
.start-menu.show {
display: block;
}
.start-menu-header {
background: linear-gradient(90deg, #0000ff, #000080);
color: white;
padding: 4px 8px;
font-weight: bold;
transform: rotate(-90deg);
transform-origin: left bottom;
position: absolute;
left: 20px;
bottom: 0;
width: 100px;
}
.start-menu-items {
margin-left: 25px;
padding: 4px 0;
}
.start-menu-item {
padding: 4px 8px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
}
.start-menu-item:hover {
background: #0000ff;
color: white;
}
.context-menu {
position: fixed;
background: #c0c0c0;
border: 2px outset #c0c0c0;
display: none;
z-index: 1002;
min-width: 120px;
}
.context-menu.show {
display: block;
}
.context-menu-item {
padding: 4px 8px;
cursor: pointer;
}
.context-menu-item:hover {
background: #0000ff;
color: white;
}
.context-menu-separator {
height: 1px;
background: #808080;
margin: 2px 4px;
}
.file-explorer {
display: flex;
flex-direction: column;
height: 100%;
}
.file-explorer-toolbar {
height: 30px;
background: #c0c0c0;
border-bottom: 1px solid #808080;
display: flex;
align-items: center;
padding: 0 4px;
gap: 4px;
}
.file-explorer-button {
padding: 2px 8px;
background: #c0c0c0;
border: 1px outset #c0c0c0;
cursor: pointer;
font-size: 10px;
}
.file-explorer-button:active {
border: 1px inset #c0c0c0;
}
.file-explorer-content {
flex: 1;
display: flex;
}
.file-explorer-sidebar {
width: 150px;
background: white;
border-right: 1px solid #808080;
padding: 4px;
}
.file-explorer-main {
flex: 1;
background: white;
padding: 4px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
gap: 4px;
}
.file-item {
width: 64px;
height: 64px;
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
padding: 4px;
border: 1px solid transparent;
}
.file-item.selected {
background: #0000ff;
color: white;
border: 1px dotted white;
}
.file-item img {
width: 32px;
height: 32px;
margin-bottom: 4px;
}
.file-item span {
font-size: 10px;
text-align: center;
word-wrap: break-word;
max-width: 60px;
}
.paint-app {
display: flex;
flex-direction: column;
height: 100%;
}
.paint-toolbar {
height: 40px;
background: #c0c0c0;
border-bottom: 1px solid #808080;
display: flex;
align-items: center;
padding: 0 4px;
gap: 4px;
}
.paint-tool {
width: 24px;
height: 24px;
background: #c0c0c0;
border: 1px outset #c0c0c0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.paint-tool.active {
border: 1px inset #c0c0c0;
}
.paint-canvas-container {
flex: 1;
background: white;
overflow: auto;
position: relative;
}
.paint-canvas {
background: white;
cursor: crosshair;
}
.color-palette {
display: flex;
gap: 2px;
margin-left: 10px;
}
.color-swatch {
width: 20px;
height: 20px;
border: 1px solid #000;
cursor: pointer;
}
.color-swatch.active {
border: 2px solid #fff;
box-shadow: 0 0 0 1px #000;
}
.notepad {
height: 100%;
}
.notepad textarea {
width: 100%;
height: 100%;
border: none;
font-family: 'Courier New', monospace;
font-size: 12px;
padding: 4px;
resize: none;
outline: none;
}
.calculator {
width: 200px;
height: 250px;
}
.calc-display {
height: 40px;
background: white;
border: 2px inset #c0c0c0;
margin: 4px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 8px;
font-family: 'Courier New', monospace;
font-size: 14px;
}
.calc-buttons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2px;
padding: 4px;
height: calc(100% - 48px);
}
.calc-button {
background: #c0c0c0;
border: 2px outset #c0c0c0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.calc-button:active {
border: 2px inset #c0c0c0;
}
.folder-tree-item {
padding: 2px 4px;
cursor: pointer;
font-size: 10px;
}
.folder-tree-item:hover {
background: #e0e0e0;
}
.folder-tree-item.selected {
background: #0000ff;
color: white;
}
.resize-handle {
position: absolute;
background: transparent;
}
.resize-handle.se {
bottom: 0;
right: 0;
width: 10px;
height: 10px;
cursor: se-resize;
}
.resize-handle.s {
bottom: 0;
left: 10px;
right: 10px;
height: 3px;
cursor: s-resize;
}
.resize-handle.e {
right: 0;
top: 20px;
bottom: 10px;
width: 3px;
cursor: e-resize;
}
</style>
</head>
<body>
<div class="desktop" id="desktop">
<!-- Desktop Icons -->
<div class="desktop-icon" style="top: 20px; left: 20px;" data-app="my-computer">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJYSURBVFhH7ZY9SwNBEIafgIWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF