快捷键
- 铺满窗口:
- W
- 窗口适配:
- S
- 全屏模式:
- F
- 切换主题:
- T
- 上一页:
- ↑ / ← / P / PageDown
- 下一页:
- ↓ / → / N / PageUp / Space
- 第一页:
- Home
- 最后一页:
- End
- 画笔:
- Ctrl+鼠标左键
- 荧光笔:
- Alt+鼠标左键
特点:
<div class="wrap"> <div class="box1">1</div> <div class="box2">2</div> <div class="box3">3</div> </div>
设置弹性盒模型对象的子元素的排列方式。
设置弹性盒模型对象的子元素的排列方式。
设置弹性盒模型对象的子元素的排列方式。
设置弹性盒模型对象的子元素如何分配其剩余空间。
设置弹性盒模型对象的子元素的显示顺序。
设置弹性盒模型对象的子元素的排列顺序是否反转。
设置弹性盒模型对象的子元素是否可以换行显示。
single(默认) | multiple
设置弹性盒模型对象的子元素的所属组。
PS: 以上2个目前都未实现
border-radius: 10px;
长度值:
百分比:
border-radius: 10px 30px
border-radius: 10px 30px 50px
border-radius: 10px 30px 70px 50px
border-radius: 水平半径{1,4} / 垂直半径{1,4}
border-radius: 60px / 30px
border-radius: 10px 50px / 20px 40px 60px 80px
border-top-left-radius: 20px; border-top-right-radius: 80px 40px; border-bottom-left-radius: 30px; border-bottom-right-radius: 70px;
border-radius: 50% / 65% 65% 35% 35%;
border-image:url(res/border.png) 27 27 27 27 / 27px 27px 27px 27px repeat
box-shadow: 0 5px 20px 0 red
水平偏移:
垂直偏移:
模糊半径:
阴影扩展:
background-image: radial-gradient( 50% 110%, ellipse farthest-side, white 56%, #FF4D4D 59%, #FFA64D 62%, #FFDC73 65%, #93FF26 68%, #4DFFFF 71%, #2693FF 74%, #D24DFF 77%, white 80%);
background: -webkit-linear-gradient(#fff, olive); background: -moz-linear-gradient(#fff, olive); background: -ms-linear-gradient(#fff, olive); background: -o-linear-gradient(#fff, olive); background: linear-gradient(#fff, olive);
设置背景图像是随对象内容滚动还是固定的。
border: 2px solid #333; height: 200px; overflow: auto; background: url(res/icon.png) no-repeat 50% top;
scroll(默认) | fixed | local(CSS3) |
---|---|---|
|
|
|
设置对象的背景图像如何铺排填充。
border: 2px solid #333; height: 240px; background: url(res/icon.png) no-repeat 0 0;
repeat(默认) | round(CSS3) | space(CSS3) |
---|---|---|
设置对象的背景图像background-position的原点(位置)。
border: 10px solid rgba(0,0,0,.5); padding: 20px; height: 160px; background: url(res/icon.png) no-repeat 0 0;
padding-box(默认) | border-box | content-box |
---|---|---|
content
|
content
|
content
|
设设置对象的背景图像的尺寸大小。
border: 10px solid rgba(0,0,0,.5); padding: 20px; height: 120px; background: url(res/icon.png) no-repeat 0 0;
auto(默认) | 50px 80% | cover | contain |
---|---|---|---|
content
|
content
|
content
|
content
|
设置指定对象的背景图像向外裁剪的区域。
border: 10px solid rgba(0,0,0,.5); padding: 20px; height: 80px; background: url(res/icon.png) no-repeat 0 0; background-size: 64px; background-origin: border-box;
border-box(默认) | padding-box | content-box |
---|---|---|
content
|
content
|
content
|
设置对象的多重背景图像(background-color不能设置多重)。
height: 200px; border: 2px solid #333; background:url(res/logo.png) no-repeat center, linear-gradient(#fff,rgba(255,255,255,.5)), skyblue; background-size: 128px 128px, 100% 50%, 100% 100%;
width: 200px; height: 200px; padding: 20px; border: 10px solid red;
content-box(默认) | border-box |
---|---|
|
设置对象是否允许用户缩放,调节元素尺寸大小。
如果希望此属性生效,需要设置对象的overflow属性,值可以是auto,hidden或scroll。
none(默认) | both | horizontal | vertical |
---|---|---|---|
设置是否允许用户激活输入中文,韩文,日文等的输入法(IME)状态。
auto(默认) | disabled |
---|---|
文本框: | 文本框: |
columns: 200px
What happens when the 'height' property is non-auto? Are column lengths in any way constrained by the 'height' property? Two options seems possible:
Similarly, the 'max-height' and 'min-height' properties must be described.
Another option is to create 'column-length' property.
What is the desired behaviour when an element in a column is an absolute container (e.g., relatively positioned)? In particular, do its absolutely positioned children break at column boundaries too? A similar question arises for pages and the fact that we don't currently break abs-pos children across page boundaries is a huge source of complaints, so I strongly push for abs-pos children to break at column boundaries, and I'd like as much guidance as possible as to the preferred behaviour. Do consider what happens if the in-flow content fits in N columns but additional columns would be required to fit abs-pos content.
宽度:
列数:
设置对象每列的宽度
column-width: 200px
设置对象每列的列数
column-count: 4
设置对象的列与列之间的边框,参阅border属性。
column-rule: 5px dashed blue
What happens when the 'height' property is non-auto? Are column lengths in any way constrained by the 'height' property? Two options seems possible:
Similarly, the 'max-height' and 'min-height' properties must be described.
Another option is to create 'column-length' property.
What is the desired behaviour when an element in a column is an absolute container (e.g., relatively positioned)? In particular, do its absolutely positioned children break at column boundaries too? A similar question arises for pages and the fact that we don't currently break abs-pos children across page boundaries is a huge source of complaints, so I strongly push for abs-pos children to break at column boundaries, and I'd like as much guidance as possible as to the preferred behaviour. Do consider what happens if the in-flow content fits in N columns but additional columns would be required to fit abs-pos content.
column-gap: 50px
What happens when the 'height' property is non-auto? Are column lengths in any way constrained by the 'height' property? Two options seems possible:
Similarly, the 'max-height' and 'min-height' properties must be described.
Another option is to create 'column-length' property.
What is the desired behaviour when an element in a column is an absolute container (e.g., relatively positioned)? In particular, do its absolutely positioned children break at column boundaries too? A similar question arises for pages and the fact that we don't currently break abs-pos children across page boundaries is a huge source of complaints, so I strongly push for abs-pos children to break at column boundaries, and I'd like as much guidance as possible as to the preferred behaviour. Do consider what happens if the in-flow content fits in N columns but additional columns would be required to fit abs-pos content.
列间距:
column-span: all
What happens when the 'height' property is non-auto? Are column lengths in any way constrained by the 'height' property? Two options seems possible:
Similarly, the 'max-height' and 'min-height' properties must be described.
Another option is to create 'column-length' property.
我是一个大标题
What is the desired behaviour when an element in a column is an absolute container (e.g., relatively positioned)? In particular, do its absolutely positioned children break at column boundaries too? A similar question arises for pages and the fact that we don't currently break abs-pos children across page boundaries is a huge source of complaints, so I strongly push for abs-pos children to break at column boundaries, and I'd like as much guidance as possible as to the preferred behaviour. Do consider what happens if the in-flow content fits in N columns but additional columns would be required to fit abs-pos content.
设置对象之前是否断行。
What happens when the 'height' property is non-auto? Are column lengths in any way constrained by the 'height' property? Two options seems possible:
Similarly, the 'max-height' and 'min-height' properties must be described.
What is the desired behaviour when an element in a column is an absolute container?
When an element that forms a stacking context (e.g. abs-pos with z-index not 'auto', or 'opacity' not 1) breaks vertically, do the pieces together still form a single stacking context? This could get hard to implement in general.
设置对象之后是否断行。
设置对象内部是否断行。
<ul class="balls balls-1"> <li>1</li>...<li>10</li> </ul>
<ul class="balls balls-2"> <li>1</li>...<li>10</li> </ul>
.balls > li:only-child { ... }
<ul class="balls"> <li>1</li> </ul> <ul class="balls"> <li>1</li><li>2</li><li>3</li> </ul>
.balls > li:first-child { ... }
.balls > li:last-child { ... }
p1
匹配不含有s选择符的元素E。
匹配E元素在文档的根元素。在HTML中,根元素永远是HTML。
匹配没有任何子元素(包括text节点)的元素E。
匹配相关URL指向的E元素。
.balls > li:nth-child(-n+4) { ... }
.balls > li:nth-child(4n+1) { ... }
html->32px
font-size:0.5em font-size:2em
font-size:0.5em font-size:2rem
90deg = 100grad = 0.25turn ≈ 1.570796326794897rad
scale(1, 1)
X:
Y:
以下三种语法效果一样
transform: scale(2);
transform: scale(2, 2);
transform: scaleX(2) scaleY(2);
translate(0, 0)
X:
Y:
以下两种语法效果一样
transform: translate(100px, 100%);
transform: translateX(100px) translateY(100%);
transform: translate(100%);
skew(0, 0)
X:
Y:
以下两种语法效果一样
transform: skew(100deg, 100deg);
transform: skewX(100deg) skewY(100deg);
transform: skew(100deg);
rotate(0)
Angel:
矩阵。。。
transfarm: scale(1.5);
50% 50%(默认) | top left | bottom center |
---|---|---|
|
|
|
transform: rotate(30deg) scale(1.5) skew(10deg, 50deg); transform-origin: top left;
div { transition: transform ease-in .5s; } div:hover { transform: scale(2); }
设置对象中的参与过渡的属性。
transition-property: all; /*默认*/ transition-property: none; transition-property: background-color; transition-property: background-color, height, width;
设置对象过渡的持续时间。
transition-duration: 2s; transition-duration: 4000ms; transition-duration: 4000ms, 8000ms;
设置对象中过渡的类型。
ease(默认) | |
linear | |
ease-in | |
ease-out | |
ease-in-out |
ease-in-out: 由慢到快再到慢→贝塞尔曲线(0.42, 0, 0.58, 1.0)
设置对象延迟过渡的时间。
0(默认) | |
1s | |
2000ms | |
-3s |
复合语法
transition: width 3s, height 2s 2s; transition: background-color 3s linear 1s; transition: 4s ease-in-out; transition: 5s;
div:hover i { animation: loading 3s ease-out infinite } @keyframes loading{ 0% { width: 0 } 100% { width: 100% } }
↑ 鼠标移上去 ↑
div { animation: name 3s ease 1s 3 alternate; }