如何使这样的布局,这将使的转变,如在当屏幕变小。在引导程序,弹性盒,角材料或原始CSS中以任何方式存在解决方案吗?可扩展的布局过渡
Q
可扩展的布局过渡
0
A
回答
0
这里是什么我想你想与角料尝试 - CodePen
我能想到把“1”之间的“2”和“唯一的办法3“对于较小的屏幕是为”1“创建指令,该指令根据屏幕尺寸打开和关闭。
标记
<div ng-controller="AppCtrl" ng-cloak="" ng-app="MyApp">
<div layout="row">
<div flex="30" hide-xs layout="column">
<one class="aDiv"></one>
</div>
<div layout="column" flex>
<div class="aDiv" style="background:pink; height:50px">2</div>
<div class="aDiv" hide-gt-xs show-xs layout="row" layout-align="center">
<one flex="50"></one>
</div>
<div class="aDiv" style="background:orange; height:700px">3</div>
</div>
</div>
</div>
CSS
.aDiv {
margin: 10px
}
JS
angular.module( 'MyApp的',[ 'ngMaterial', 'ngMessages'])
.controller('AppCtrl', function() {
})
.directive("one", function() {
return {
template: '<div style="background:yellow; height:500px">1</div>'
}
});
+0
哦!谢谢 ! – Katamaran
0
您可以使用Flexbox的像它下面做。
.wrapperDiv { display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column; }
.first, .second, .third {
border: 1px solid red;
flex: 1 100%;
}
.first { order: 2; }
.second { order: 1; }
.third { order: 3; }
@media only screen and (min-width : 768px) {
.first, .second, .third {
-webkit-flex-direction: row;
flex-direction: row;
}
.first { order: 1; }
.second { order: 2; }
.third { order: 3; }
}
<div class="wrapperDiv">
<div class="first">
1st div
</div>
<div class="second">
2nd div
</div>
<div class="third">
3rd div
</div>
</div>
相关问题
- 1. 可扩展Gridview布局
- 2. 在android中的可扩展布局
- 3. 创建一个动态可扩展的布局和扩展
- 4. CakePHP的,扩展和布局
- 5. 可扩展列表项目布局
- 6. 是否可以扩展布局?
- 7. 使用TextView扩展布局
- 8. expressjs:如何扩展布局
- 9. UITableViewCell扩展自动布局
- 10. 在Magento中扩展布局
- 11. Qt布局不扩展
- 12. Android的布局过渡效果
- 13. 使用tile布局的CSS过渡动画有可能实现?
- 14. 的Android,添加扩展以XML布局
- 15. Android:扩展布局中的中心Textview
- 16. Zend Framework布局的文件扩展
- 17. 无布局的按钮扩展
- 18. Android扩展布局高度,使布局占用屏幕的50%
- 19. CardView ListView中的布局只扩展1布局?
- 20. Android的可扩展列表:组不同的布局
- 21. 通过扩展布局的视图包含外部资源
- 22. 如何从扩展活动中扩展布局?
- 23. 控制可折叠布局中的节点扩展
- 24. 什么是使布局可扩展的最佳实践?
- 25. 可能会膨胀由ActionBarSherlock扩展的android微调器布局?
- 26. 是否有易于使用的可扩展布局?
- 27. 如何制作固定边和可扩展中心的布局?
- 28. 不带布局xml的可扩展列表视图
- 29. 如何获得这样一个可扩展的布局?
- 30. 如何正确地扩展布局类?
你可以在bootstrap中做到这一点 –
很酷,你能告诉我吗? 怎么样? – Katamaran
通过使用引导网格system.please请参阅http://v4-alpha.getbootstrap.com/layout/grid/ –