gpt4 book ai didi

html - 带有重叠文本的五个按钮

转载 作者:太空宇宙 更新时间:2023-11-04 02:57:43 27 4
gpt4 key购买 nike

我正在构建以下内容(见图)。基本上,我需要 5 个顶部有重叠按钮(每个都有数字)的按钮。但是,我不确定该怎么做? enter image description here

最佳答案

一个解决方案:

https://jsfiddle.net/ryd5e51n/

enter image description here

<div class="button">
<div class="button-top"><span class="text">1</span></div>
<div class="button-bottom"></div>
</div>

.button
{
display: table;
}

.button-top
{
background-color: black;
width: 36px;
height: 36px;
border-radius: 18px;
margin: auto;
position: relative;
z-index: 2;
box-shadow: 0px 0px 2px 2px #bbbbbb;
color: white;
text-align: center;
}

.text
{
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
}

.button-bottom
{
background-color: #efefef;
width: 100px;
height: 90px;
margin-top: -15px;
position: relative;
z-index: 1;
border: 2px solid #bbbbbb;
border-radius: 20px;
}

关于html - 带有重叠文本的五个按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31868423/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com