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 ...
随机推荐
- h5拖放-ff的bug
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- iOS 对网络视频采集视频截图
在播放网络视频是 经常可以看到播放按钮下面是该制品的某个截图 : 一般情况下 后台服务器是可以把视频截图一起返回给你 你直接拿到图片显示就可以了 但是当后台没有提供时 我们也可以根据视频地址 自 ...
- Unix网络编程(1)——socket一窥
套接口地址结构 IPv4的套接口地址结构为: struct sockaddr_in { uint8_t sin_len; sa_family_t sin_family; struct in_addr ...
- js事件(Event)知识整理[转]
事件注册 平常我们绑定事件的时候用dom.onxxxx=function(){}的形式 这种方式是给元素的onxxxx属性赋值,只能绑定有一个处理句柄. 但很多时候我们需要绑定多个处理句柄到一个事件上 ...
- [原]Unity3d中奇怪的编译错误
整理项目,重新build时出现一些问题,这些代码在原项目中都是可以运行的. 错误信息如下: Assets/XXXXX.cs(79,35): error CS0103: The name `NNNNNN ...
- [记录]java.math.biginteger cannot be cast to java.lang.long
可以直接使用BigInteger类型进行接收, BigInteger id = (BigInteger)QueryRunner(conn,"SELECT LAST_INSERT_ID&quo ...
- SpriteFrameCache 精灵帧缓存
//获取精灵帧缓存的单例对象 auto spriteFrameCache = SpriteFrameCache::getInstance(); //从plist文件添加多个精灵帧 spriteFra ...
- confirm的用法
内容换行:第一种方法:var str = "aaaaa\\n11111";confirm(str.replace("\\n","\n")); ...
- Ajax的Get和Post的区别
Ajax的Get和Post的区别Get方式:用get方式可传送简单数据,但大小一般限制在1KB下,数据追加到url中发送(http的header传送),也就是说,浏览器将各个表单字段元素及其数据按照U ...
- Drbd 安装配置
一.Drbd介绍 Distributed Replicated Block Device(DRBD)是基于块设备在不同的高可用服务器之间同步和镜像数据的软件,通过它可以实现在网络中两台服务器这间基于块 ...