【发布时间】:2022-12-18 17:22:23
【问题描述】:
我正在制作一个关于如何第一次使用我的应用程序的教程。
所以它看起来像一个关于如何使用按钮的弹出窗口
在教程中,我想让背景变暗,然后出现一个圆圈来圈住按钮,并且有一个教程文本
所以,我想做一个有圆孔的容器
这是一个简单的例子:
<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">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
.dark{
height: 100%;
width: 100%;
position: fixed;
background-color: rgba(0, 0, 0, 0.377);
}
.circle{
height: 150px;
width: 150px;
border-radius: 50%;
background-color: white;
}
</style>
</head>
<body>
<div class="dark">
<p style="color:white;font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-size: 23px;">This button is used to delete your file.</p>
<div class="circle"></div>
</div>
<button style="margin:200px;">The Button</button>
</body>
但我希望孔在按钮上
【问题讨论】:
-
您可以对圆圈应用一些边距,或使用定位
-
不工作。洞的颜色不透明
标签: javascript html css