bootatrap如何让子元素在父元素位置垂直居中
1个回答
展开全部
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.div1 {
text-align: center;
background-color: violet;
padding: 100px 0;
}
</style>
</head>
<body>
<div class="div1">
<span>1,2,3,4,5</span>
<div>
hello
</div>
<div>
world
</div>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询