我想在图像中创建内容,并在下面停止可拖动窗口的显示。Z索引不起作用。它破坏了字体(可能)并破坏了标题。还有其他不会引起问题的方法吗?如果你能解决这个问题,我将非常感谢你的帮助。如果你想知道这个项目是什么,它是一个类似于windows-98/95的东西。我很快就会更改项目的名称。请注意:该字体仅适用于网站。(https://oli.neocities.org/windows97/)
代码:https://jsfiddle.net/9p28gLvb/
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="https://oli.neocities.org/style.css" rel="stylesheet" type="text/css" media="all">
<script>
$( function() {
$('#window').draggable({containment:"#Image"});
} );
</script>
<style>
img {
contain: content;
}
#window {
background-color: #B9BABD;
height: 162px;
width: 404px;
font-family: 'Normal';
}
.windowtitle {
background: rgb(2,0,36);
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%);
width: 404px;
height: 20px;
font-size: 16px;
color: white;
font-family: 'Normal';
}
.windowbody {
}
button {
display: block;
background-color: #B9BABD;
border-color: black;
font-family: 'Normal';
}
@font-face {
font-family: 'Normal';
src: url('https://oli.neocities.org/windows97/fonts/normal.ttf') format('truetype');
}
</style>
</head>
<body>
<img src="https://oli.neocities.org/windows97/images/background.png" id="Image" style="background-size: cover; width:100%;height:100%;">
<div id="window">
<div class="windowtitle">
<b>System</b>
</div>
<div class="windowbody">
<center>
<div style="clear: left;">
<p style="float: left;"><img src="/windows97/images/bubble_i.png" height="48" width="48"></p>
<p>Zoom to 67% for the best experience.</p>
</div>
</center>
<center>
<button>OK</button>
</center>
</div>
</div>
</img>
</body>
</html>```发布于 2021-05-20 23:20:18
解决了它
我做了一个容器..
(编辑:我目前正在做这个项目,稍后会得到代码。)
https://stackoverflow.com/questions/67621608
复制相似问题