[图片有设计][1]图片描述了我想要的设计。我尝试过的是,我将三个按钮放在一起并尝试放置 z-index ,绝对位置,相对位置, 但没有用。
我试过的代码是,我同时应用了三个按钮: 123
我得到的看起来像这样 [这是我制作的图像] /image/ruxL5.png
最佳答案
请参阅此示例。回家,你得到你想要的。 http://embed.plnkr.co/ExU03A42KNqr6XakFo4I/
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
<style>
button{
width:120px;
height:40px;
margin:-5px;
background:#ee5353;
border:1px solid gray;
border-radius:3px;
}
button:nth-child(2){
height:60px;
position:relative;z-index:2;
}
</style>
</head>
<body>
<button>1</button>
<button>2</button>
<button>3</button>
</body>
</html>
关于html - 如何设计一个重叠的按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44567714/