我正在处理以下代码:
list
List<? extends E>
如您所见,justify-content属性不起作用。
好吧,我需要一些帮助,谢谢:)
答案 0 :(得分:0)
如果您的意思是使按钮位于标题下方:
.positiones {
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
}
.button {
display:block;
margin: 0 auto 0 auto;
width: 100px;
}
<div class="positiones">
<div>
<h1>The biggest startup event of the year!</h1>
<button class="button" type="button" class="btn btn-primary btn-lg">Get more info</button>
</div>
</div>
答案 1 :(得分:0)
.button不在.positiones内。我放在.positiones里面。然后我添加flex-direction:column
.positiones {
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
flex-direction:column;
}
<div class="positiones">
<div class="mainheading">
<h1>The biggest startup event of the year!</h1><br>
</div>
<div class="Button">
<button type="button" class="btn btn-primary btn-lg">Get more info</button><br>
</div>
</div>
<div class="linebreak"></div><br>