弹窗在手机端为什么按钮会换行?手机宽度是足够的,如果设置了固定宽度又不会换行了
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.shade{
background: rgba(0,0,0,0.3);
height: 100%;
width: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
position: fixed;
}
.pop{
/*width: 70%;*/
position: absolute;
/*display: inline-block;*/
background: #fff;
border-radius: 0.25rem;
padding: 1rem;
text-align: center;
top: 50%;
left: 50%;
transform: translate3d(-50%,-50%,0);
}
.text{
font-size: 0.75rem;
margin-bottom: 1rem;
}
.btn{
width: 4rem;
height: 1.6rem;
font-size: 0.75rem;
color: #fff;
border-radius: 0.25rem;
border:none;
}
.confirm{
background: blue;
}
.cancle{
background: gray;
}
</style>
</head>
<body>
<div class="shade">
<div class="pop">
<p class="text">确认要删除吗</p>
<button class="btn confirm">确认</button>
<button class="btn cancle">取消</button>
</div>
</div>
<script src="js/flexible.js"></script>
</body>
</html>1
收起
正在回答 回答被采纳积分+1
2回答
3.WebAPP开发与小程序
- 参与学习 人
- 提交作业 622 份
- 解答问题 6815 个
微信带火了小程序,也让前端工程师有了更多的展现机会,本阶段带你从移动基础知识的学习到webAPP开发,及小程序开发,让你PC端与移动端两端通吃。
了解课程








恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星