微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Angular Material Flex指令

<pre><code class="lang-html"><html lang = en> <head> <link rel = stylesheet href = https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css> <script src = https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js></script> <script src = https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js></script> <script src = https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js></script> <script src = https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js></script> <script src = https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js></script> <link rel = stylesheet href = https://fonts.googleapis.com/icon?family=Material+Icons> <style> .Box { color:white; padding:10px; text-align:center; border-style: inset; } .green { background:green; } .blue { background:blue; } </style> <script language = javascript> angular .module('firstApplication', ['ngMaterial']) .controller('layoutController', layoutController); function layoutController ($scope) { } </script> </head> <body ng-app = firstApplication> <div id = layoutContainer ng-controller = layoutController as ctrl layout = row style = height:100px; ng-cloak layout-wrap> <div flex = 30 class = green Box> [flex = 30] </div> <div flex = 45 class = blue Box> [flex = 45] </div> <div flex = 25 class = green Box> [flex = 25] </div> <div flex = 33 class = green Box> [flex = 33] </div> <div flex = 66 class = blue Box> [flex = 66] </div> <div flex = 50 class = blue Box> [flex = 50] </div> <div flex class = green Box> [flex] </div> </div> </body> </html> </code></pre>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐