ms-grid layout
<!DOCTYPE html>
<html>
<head>
<title></title> <script src="js/jq.js"></script>
<script src="js/ko.js"></script>
<script src="resources/lib/core.js"></script>
<script src="resources/lib/nav.js"></script>
<script src="js/index.js"></script> <style>
.container {
width: 620px;
height: 415px;;
display: -ms-grid;
-ms-grid-columns: 5px(200px 5px ) [ 3 ];
-ms-grid-rows: 5px(200px 5px ) [ 2 ];
border: 1px solid red;
} .item {
width: 200px;
height: 200px;
line-height: 200px;
text-align: center;;
border: 1px solid deepskyblue;
} .item:nth-child(odd){
background: cornflowerblue;
color:white;
}
.item:nth-child(even){
background: darkslategray;
color:white;
} .container .item:first-child {
-ms-grid-column: 2;
-ms-grid-row: 2;
} .container .item:nth-child(2) {
-ms-grid-column: 4;
-ms-grid-row: 2;
} .container .item:nth-child(3) {
-ms-grid-column: 6;
-ms-grid-row: 2;
} .container .item:nth-child(4) {
-ms-grid-column: 2;
-ms-grid-row: 4; } .container .item:nth-child(5) {
-ms-grid-column: 4;
-ms-grid-row: 4;
} .container .item:nth-child(6) {
-ms-grid-column: 6;
-ms-grid-row: 4;
} .container .item:nth-child(7) {
-ms-grid-column: 2;
-ms-grid-row: 6;
}
</style>
</head>
<body> <div class='container' data-bind='foreach:people'>
<div class='item' data-bind='text:item'> </div> </div> </body>
</html>
ms-grid layout的更多相关文章
- CSS3 GRID LAYOUT
CSS3 GRID LAYOUT http://www.w3cplus.com/blog/tags/356.html 中国首个开源 HTML5 跨屏前端框架 http://amazeui.org/
- iphone Dev 开发实例9:Create Grid Layout Using UICollectionView in iOS 6
In this tutorial, we will build a simple app to display a collection of recipe photos in grid layout ...
- Unity3D 使用 UI 的 Grid Layout Group 组件。
1.首先创建一个容器,用于存放列表项的内容. 这里使用 Panel 来做为容器. 这里要注意! “Grid Layout Group”是要增加在容器的游戏对象里. 同时,只有容器对象的子对象才有排列效 ...
- WPF笔记(2.4 Grid)——Layout
原文:WPF笔记(2.4 Grid)--Layout 第一章已经简单介绍过这个容器,这一节详细介绍.Grid一般是用表格(Grid.Row 和Grid.Column )的,比StackPanel更细致 ...
- flexbox与grid layout的区别
flexbox是一种针对一维的局部布局,以轴为核心的弹性布局. grid layout是二维的更加全面的网格布局,
- CSS: Grid Layout Module
Grid Layout The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, mak ...
- [Grid Layout] Use the repeat function to efficiently write grid-template values
We can use the repeat() function if we have repeating specifications for columns and rows. With the ...
- [Grid Layout] Describe a grid layout using named grid lines
We can use named grid lines to describe our grid layout. Let’s see how to apply this to our grid-tem ...
- [Grid Layout] Specify a grid gutter size with grid-gap
It’s beautifully straightforward to add a gutter to our grid layout. Let’s apply one with grid-gap.
- [CSS] Get up and running with CSS Grid Layout
We’ll discuss the display values pertinent to CSS Grid Layout – grid, inline-grid, and subgrid. Then ...
随机推荐
- Ⅳspring的点点滴滴--方法和事件
承接上文 方法和事件 .net篇(环境为vs2012+Spring.Core.dll v1.31) public abstract class MethodDemo { protected abstr ...
- Android 100多个Styles快速开发布局XML,一行搞定View属性,一键统一配置UI...
Android开发中大量使用XML代码作为界面的布局,使用styles能大幅精简XML代码. 比如下面这个界面从AlertDialog至PlacePickerWindow有19个样式相同的跳转Item ...
- java1.5新特性
一:增强for循环 增强for的格式:for(数据类型 变量名:集合或者 数组){ } 传统的for循环可以对数组进行遍历: for(int x=0;x { Syste ...
- [转]ASP.NET MVC中你必须知道的13个扩展点
本文转自:http://www.cnblogs.com/ejiyuan/archive/2010/03/09/1681442.html ScottGu在其最新的博文中推荐了Simone Chiaret ...
- excel知识
excel中导出文本中的制表符去除方法:
- JavaScript高级程序设计(七):JavaScript中的in关键字
in 使用点一: 在js中,for--in用于遍历一个对象的属性,把对象的属性名和属性值都提出来. var obj = { "key1":"value1", & ...
- OC1_类与对象
// // main.m // OC1_类与对象 // // Created by zhangxueming on 15/6/9. // Copyright (c) 2015年 zhangxuemin ...
- Action Filters for ASP.NET MVC
本文主要介绍ASP.NET MVC中的Action Filters,并通过举例来呈现其实际应用. Action Filters 可以作为一个应用,作用到controller action (或整个co ...
- ajax和jsonp的封装
一直在用jQuery的ajax,跨域也是一直用的jQuery的jsonp,jQuery确实很方便,$.ajax({...})就可以搞定. 为了更好的理解ajax和jsonp,又重新看了下书,看了一些博 ...
- 转:如何取得Spring管理的bean
原文链接:http://blog.csdn.net/a9529lty/article/details/42145545 1.servlet方式加载时,[web.xml] <servlet> ...