I want to use flex box model in my html
I have a div container with three buttons inside.
<div id="viewport" class="linearlayout horizontal" data-am-control="vertical-layout" >
<!-- El div "container_buttons" estaría centrado en el medio del padre -->
<button id="twitter" class="btn item" data-am-control="button" >Twitter dinámico</button>
<button id="spinnerSimple" class="btn item" data-am-control="button" >Spinner simple</button>
<button id="spinnerCustom" class="btn item" data-am-control="button" >Spinner personalizado</button>
</div><!-- END VIEWPORT-->
I use display: box and orientation: vertical...but i see my buttons inline insted of vertical..
My problem is with all browsers.
Css is this:
#viewport{
width: 480px;
height: 800px;
background-image: linear-gradient(#a8a8a8, #ebebeb);
margin: 0 auto;
}
.linearlayout{
display: -webkit-box;
display: -moz-box;
display: box;
}
.horizontal{
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
box-orient: horizontal;
}
.vertical{
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
box-orient: vertical;
}
http://jsfiddle.net/adUD9/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…