Flex 学习
Flex案例一:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题</title>
<style type="text/css">
body,h1,h2,h3,h4,h5,h6,dl,dt,dd,ul,ol,li,th,td,p,blockquote,pre,form,fieldset,legend,input,button,textarea,hr{
margin:0;
padding:0;
}
body{
display: flex;
background: -webkit-linear-gradient(top,#222,#333);
background: linear-gradient(top,#222,#333);
justify-content:center;
align-items:center;
align-content:center;
flex-wrap:wrap;
position:relative;
}
[class$="box"]{
background-color: #e7e7e7;
width: 104px;
height: 104px;
/*padding:4px;
margin:16px;*/
object-fit:contain;
border-radius: 10%;
box-shadow: inset 0 5px white,inset 0 -5px #bbb,inset 5px 0 #d7d7d7,inset -5px 0 #d7d7d7;
display: flex; position: absolute;
top:0;
left: 0;
/*top: 40%;
left: 40%;*/
}
[class="item"]{
display: block;
width:24px;
height: 24px;
border-radius: 50%;
margin:4px;
background-color: #333;
box-shadow: inset 0 3px #111,inset 0 -3px #555;
}
.first-box{
justify-content:center;
align-items:center;
align-content:center;
}
.second-box{
justify-content:space-between;
}
.second-box .item:nth-of-type(2){
-webkit-align-self:flex-end;
}
.third-box{ }
.third-box .item:nth-of-type(2){
align-self:center;
}
.third-box .item:nth-of-type(3){
align-self:flex-end;
}
.sixth-box,
.four-box{
justify-content:space-between;
justify-wrap:wrap;
}
.sixth-box .column,
.four-box .column{
display: flex;
flex-direction:column;
justify-content:space-between;
}
.fifth-box{
justify-content:space-between;
}
.fifth-box .column{
display: flex;
flex-direction:column;
justify-content:space-between;
}
.fifth-box .column:nth-of-type(2){
justify-content:center;
align-items:center;
} .tbox{
width: 104px;
height: 104px; background-color: transparent;
border:none;
box-shadow: none;
transform-style:preserve-3d;
display: flex;
justify-content:center;
align-items:center;
align-content:center;
flex-wrap:wrap;
position:relative;
-webkit-animation:iphone 4s linear infinite; transform:rotateZ(30deg);
}
.tbox:hover{
-webkit-animation-play-state:paused;
}
.sixth-box{
/*transform:rotate(30deg);*/
transform-origin:right bottom;
transform:rotateZ(30deg);
}
.fifth-box{
margin-left: 25px;
margin-top: 7px;
transform-origin:right 50%;
transform:translateZ(-105px) rotateY(90deg) rotateX(-29deg);
}
.four-box{
margin-left: 40px;
margin-top: -45px;
/*margin-top: -36px;*/
transform-origin:left 50%;
transform:translateZ(-105px) rotateY(-90deg) rotateX(30deg);
}
.third-box{
margin-left: 40px;
margin-top:-45px;
/*margin-left: 240px;*/
transform-origin:left 50%;
transform:translateZ(-105px) rotateZ(30deg);
}
.second-box{
margin-left: 7px;
margin-top:80px;
/*margin-top: 128px;*/
transform-origin: 50% top;
transform:translateZ(-105px) rotateX(90deg) rotateY(30deg);
}
.first-box{
margin-left:58px;
margin-top:-116px;
/*margin-top: -96px;*/
transform-origin: 50% bottom;
transform:translateZ(-105px) rotateX(-90deg) rotateY(-30deg);
} @-webkit-keyframes iphone{
from{
transform:rotateY(0deg);
}
to{
transform:rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="tbox">
<div class="first-box">
<span class="item"></span>
</div>
<div class="second-box">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="third-box">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="four-box">
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
</div>
<div class="fifth-box">
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="column">
<span class="item"></span>
</div>
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
</div>
<div class="sixth-box">
<div class="column">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="column">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
</div>
</div> </body>
</html>
Flex 学习的更多相关文章
- 【转】【Flex】FLEX 学习网站分享
[转:http://hi.baidu.com/tanghecaiyu/item/d662fbd7f5fbe02c38f6f764 ] FLEX 学习网站分享 http://blog.minidx.co ...
- flex学习小结
接触到flex一个多月了,今天做一个学习小结.如果有知识错误或者意见不同的地方.欢迎交流指教. 画外音:先说一下,我是怎么接触到flex布局的.对于正在学习的童鞋们,我建议大家没事可以逛逛网站,看看人 ...
- CSS3伸缩布局Flex学习笔记
如果需要使用伸缩布局首先得把display:flex;对于兼容还得加前缀display:-webkit-display:flex;等其他浏览器前缀,但我本机Chrome测试已经不需要加前缀了,其实这些 ...
- flex学习
今天看视频学习的时候,发现css有一个 flex 的属性,非常的好用,为了让自己能够熟记,特意来分享一下flex的用法. 首先,采用Flex布局的元素,称为Flex容器(flex co ...
- 【Flex学习】Flex4学习网站
http://blog.minidx.com/category/flex 来自为知笔记(Wiz)
- Flex学习总结
Flex SDK Flex框架类库.Flex编译环境.调式器.MXML.ActionScript编程语言以及其它工具组成,Flash Builder是其开发环境, Flash Player的工作模 ...
- Flex学习第一天(两个数相加)
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="htt ...
- Flex学习教程网站地址
http://www.985school.com/flex/complex_controls.html
- flex学习网站地址
http://hacker47.iteye.com/blog/213887 http://www.cuplayer.com/player/PlayerCode/Flex/ http://bbs.9ri ...
- flex学习, 尝试布局一个计算器
<!DOCTYPE html> <html> <head> <title>flex</title> </head> <st ...
随机推荐
- 基础练习 FJ的字符串
基础练习 FJ的字符串 时间限制:1.0s 内存限制:512.0MB 问题描述 FJ在沙盘上写了这样一些字符串: A1 = “A” A2 = “ABA” A3 = “ABACAB ...
- Samsung_tiny4412(驱动笔记09)----alloc_pages,kmalloc,vmalloc,kmem_cache,class
/*********************************************************************************** * * alloc_pages ...
- caffe编译问题-src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated.
错误描述 src/caffe/net.:: fatal error: hdf5.h: No such : recipe 操作过程 step1: 在Makefile.config文件更改INCLUDE_ ...
- 配置海康相机SDK文件
前言 项目使用到海康摄像机,进行二次开发需要首先对SDK文件进行相关配置. 实现过程 1.下载SDK开发包: 网址:http://www.hikvision.com/cn/download_61.ht ...
- 强连通分量【k 算法、t 算法】
连通分量就是一个各个顶点能互相达到的图 无向图的连通分量选取任意一个顶点使用DFS遍历即可,遍历完所有顶点所需的DFS的次数就是连通分量的数量 有向图的强连通分量由于是有向的[从A点开始DFS能访问到 ...
- HTML第三课——css盒子
请关注公众号:自动化测试实战 css常用属性 width 宽 height 高 color 字体颜色 border 边框 background 背景 lesson3.html <!DOCTYPE ...
- 使用python的Paramiko模块登陆SSH
使用python的Paramiko模块登陆SSH paramiko是用Python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接. python的paramiko模块 ...
- WPF控件NumericUpDown (转)
WPF控件NumericUpDown示例 (转载请注明出处) 工具:Expression Blend 2 + Visual Studio 2008 语言:C# 框架:.Net Framework 3. ...
- Java Web HelloWorld!
距离上次做Java Web开发已经两年多了,我几乎忘得一干二净……都忘记咋搭建环境了……,然后Eclipse官网莫名其妙的挂掉.幸好电脑里还有份两年前的开发环境备份…… 重拾Java Web开发啊,说 ...
- oracle C# 访问
使用oracle的odp.net 进行oracle数据库的访问对于进行oracle数据库的开发来说是比较方便的,使用的方式与ADO.net 是一致的. 一下为使用的测试 1. 安装必要的oracle ...