/*Basic Grid Styles*/
.grid {
display: flex;
flex-flow: column;
flex-wrap: wrap;
justify-content: center;
width:600px;
height: 300px;
}
.grid-cell{
height:300px;
}
<form action="" method="post">
<div class="grid">
<textarea rows="20" cols="15" name="" class="grid-cell"></textarea>
<div class="grid-cell">
<input type="submit" value="10 >>> 13" name="submit_a" class=""/>
<input type="submit" value="10 <<< 13" name="submit_b" class=""/>
</div>
<textarea rows="20" cols="15" name="" class="grid-cell"></textarea>
</form>
答案 0 :(得分:0)
只需使用public extension UIImage {
public var hasContent: Bool {
return cgImage != nil || ciImage != nil
}
}
与供应商前缀进行后备,并删除中间容器的高度(以实现完美和自动的垂直居中)
align-items
/*Basic Grid Styles*/
.grid {
display: flex;
-ms-flex-align: center; /* IE */
-webkit-align-items: center; /* Chrome / Safari */
-webkit-box-align: center; /* Chrome / Safari */
align-items: center; /* standard */
justify-content: center;
width:600px;
height: 300px;
}
答案 1 :(得分:0)
正确地,对齐和按钮按照您想要的方式定位。
/*Basic Grid Styles*/
.grid {
display: flex;
-ms-flex-align: center; /* IE */
-webkit-align-items: center; /* Chrome / Safari */
-webkit-box-align: center; /* Chrome / Safari */
align-items: center; /* standard */
justify-content: center;
width:600px;
height: 300px;
}
.grid-cell {
margin : 5px 20px;
}
&#13;
<form action="" method="post">
<div class="grid">
<textarea rows="20" cols="15" name="" class="grid-cell"></textarea>
<div class="grid-cell">
<input type="submit" value="10 >>> 13" name="submit_a" class=""/><br/><br/>
<input type="submit" value="10 <<< 13" name="submit_b" class=""/>
</div>
<textarea rows="20" cols="15" name="" class="grid-cell"></textarea>
</div>
</form>
&#13;