Skip to content

Commit 0907a0e

Browse files
committed
🎄🎅 🦌translate doc to en
1 parent 1e4f551 commit 0907a0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+452
-428
lines changed

bevel-corners.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
# 切角效果
2+
# Cutout corners
33

4-
?> 背景知识:point_right: [gradient](https://developer.mozilla.org/zh-CN/docs/Web/CSS/gradient), [clip-path](https://developer.mozilla.org/zh-CN/docs/Web/CSS/clip-path)
4+
?> Background:point_right: [gradient](https://developer.mozilla.org/zh-CN/docs/Web/CSS/gradient), [clip-path](https://developer.mozilla.org/zh-CN/docs/Web/CSS/clip-path)
55

66
<vuep template="#bevel-corners"></vuep>
77

@@ -64,27 +64,27 @@
6464
<main>
6565
<div class="bevel-corners">
6666
<p>① linear-gradient</p>
67-
<div>A paragraph of filler text.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.</div>
67+
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dignissim diam quis enim lobortis scelerisque fermentum dui faucibus in.</div>
6868
</div>
6969
<div class="bevel-corners">
7070
<p>② radial-gradient</p>
71-
<div>A paragraph of filler text.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.</div>
71+
<div>Etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus. Neque egestas congue quisque egestas. Quis ipsum suspendisse ultrices gravida dictum fusce.</div>
7272
</div>
7373
<div class="bevel-corners">
74-
<p>内联SVG</p>
75-
<div>A paragraph of filler text.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.</div>
74+
<p>Inline SVG</p>
75+
<div>Cras semper auctor neque vitae tempus quam pellentesque nec. Congue quisque egestas diam in arcu. Purus in mollis nunc sed id semper risus in.</div>
7676
</div>
7777
<div class="bevel-corners">
7878
<p>④ clip-path</p>
79-
<div>A paragraph of filler text.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.La la la de dah de dah de dah de la.</div>
79+
<div>Molestie ac feugiat sed lectus vestibulum. Eu turpis egestas pretium aenean pharetra magna ac. Porttitor eget dolor morbi non arcu risus quis.</div>
8080
</div>
8181
</main>
8282
</template>
8383
<script>
8484
</script>
8585
</script>
8686

87-
### 浏览器支持
87+
### Browser Support
8888

8989
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-gradients&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
9090

blink.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11

2-
# 闪烁效果
2+
# Blink
33

4-
?> 背景知识::point_right: [animation-direction](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-direction)
5-
6-
`animation-direction`属性接受的值共有四个,为了你能从视觉上直接理解其作用,我以下图一段从`#FFFFFF`变化到`#b4a078`并循环三次的动画为例,展示了这四个值各自对动画的作用效果。
4+
?> Background::point_right: [animation-direction](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-direction)
75

6+
The `animation-direction` Property has four values can be accepted. For the purpose of understanding its effect visiually and precisely, this document takes the example of the animation that changes from `#FFFFFF` to `#b4a078` and loop three times, which present the different effects of the different four values. See the following diagram.
87
<div align="center"><img src="static/animation-direction.jpeg" width="60%" align="center"/></div><br />
98

10-
<vuep template="#blink"></vuep>
9+
<vuep template="#blink_tlp"></vuep>
1110

12-
<script v-pre type="text/x-template" id="blink">
11+
<script v-pre type="text/x-template" id="blink_tlp">
1312
<style>
1413
main {
1514
width: 100%; height: 329px;
@@ -54,17 +53,20 @@
5453
</style>
5554
<template>
5655
<main class="main">
57-
<span>animation-direction: 默认<code>normal</code></span><p>info~</p>
58-
<span>animation-direction: 反向<code>alternate</code></span><p>warning~ warning~</p>
59-
<span>animation-direction: 反向交替<code>alternate-reverse</code></span><p>error~ error~ error~</p>
56+
<span>animation-direction: default
57+
<code>normal</code></span><p>info~</p>
58+
<span>animation-direction: Reverse
59+
<code>alternate</code></span><p>warning~ warning~</p>
60+
<span>animation-direction: Reverse alternating
61+
<code>alternate-reverse</code></span><p>error~ error~ error~</p>
6062
</main>
6163
</template>
6264
<script>
6365
</script>
6466
</script>
6567

66-
> 一切的过度皆应该由动画来完成
68+
> All the transitions should be animated.
6769
68-
### 浏览器支持
70+
### Browser Support
6971

7072
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-animation&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>

blurry-weaken-background.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# 通过模糊弱化背景
1+
# Blurry waken background
22

3-
?> 背景知识:point_right: [css-boxshadow](https://developer.mozilla.org/zh-CN/docs/Web/CSS/css-boxshadow), HTML < [dialog](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/dialog) >
3+
?> Background:point_right: [css-boxshadow](https://developer.mozilla.org/zh-CN/docs/Web/CSS/css-boxshadow), HTML < [dialog](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/dialog) >
44

5-
<vuep template="#blurry-weaken-background"></vuep>
5+
<vuep template="#blurry-weaken-background_tlp"></vuep>
66

7-
<script v-pre type="text/x-template" id="blurry-weaken-background">
7+
<script v-pre type="text/x-template" id="blurry-weaken-background_tlp">
88
<style>
99
main {
1010
width: 100%;
@@ -80,9 +80,9 @@
8080
</script>
8181
</script>
8282
83-
> 创造良好的用户体验应当养成一种习惯~
83+
> Greate user experience should always go first as a habit ~
8484
85-
### 浏览器支持
85+
### Browser Support
8686
8787
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-boxshadow&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
8888

bounce.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11

2-
# 弹跳效果
2+
# Bounce
33

4-
?> 背景知识:point_right: [animation](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation), [timing-function](https://developer.mozilla.org/zh-CN/docs/Web/CSS/timing-function), [transform](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform)
4+
?> Background:point_right: [animation](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation), [timing-function](https://developer.mozilla.org/zh-CN/docs/Web/CSS/timing-function), [transform](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform)
55

6-
小球下落过程属于自由落体运动,在时间函数[timing-function](https://developer.mozilla.org/zh-CN/docs/Web/CSS/timing-function)中,`ease`(更快的加速度)相对更接近于自由落体运动,所以下落过程我们选用`ease`作为时间函数的关键值;当小球被弹起时属于减速运动,我们需用使用`ease`的方向版本`cubic-bezier(.1,.25,.1,.25)`(更快的减速度)作为时间函数的函数值来模仿减速运动。调速函数如下图所示:
6+
The falling of ball is a typical Free Fall motion, in the [timing function](https://developer.mozilla.org/zh-CN/docs/Web/CSS/timing-function), `ease`(sharper accelerated speed) is relatively closer to the free-fall motion. Therefore, we use the `ease` as the keyword during the falling process; However, when the ball is bounced, it belongs to the deceleration motion, we need to use the `ease` direction version `cubic-bezier(.1,.25,.1,.25)`(faster deceleration) as the function value of the time function to mimic deceleration. The speed control function is shown below:
77

88
<br/>
99
<div align="center"><img src="static/cubic-bezier.jpeg" width="100%" align="center"/></div>
1010

1111
------
1212

13-
<vuep template="#bounce"></vuep>
13+
<vuep template="#bounce_tlp"></vuep>
1414

15-
<script v-pre type="text/x-template" id="bounce">
15+
<script v-pre type="text/x-template" id="bounce_tlp">
1616
<style>
1717
main{
1818
width: 100%; height: 584px;
@@ -25,7 +25,7 @@
2525
padding: 20px;
2626
border-radius: 50%;
2727
background: #b4a078 radial-gradient(at 30% 30%, #f7f5f1, #b4a078);
28-
animation: bounce 2s cubic-bezier(.1,.25,1,.25) forwards; /* 当动画完成后,保持最后一帧 */
28+
animation: bounce 2s cubic-bezier(.1,.25,1,.25) forwards; /* when the animation is complete, keep the last frame */
2929
}
3030
@keyframes bounce {
3131
40%,
@@ -72,7 +72,7 @@
7272
</script>
7373
</script>
7474

75-
### 浏览器支持
75+
### Browser Support
7676

7777
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-animation&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
7878

centering-known.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
# 水平垂直居中
2+
# Centered
33

4-
?> 背景知识:point_right: [display](https://developer.mozilla.org/zh-CN/docs/Web/CSS/display), [calc()](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc), [flex](https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex)
4+
?> Background:point_right: [display](https://developer.mozilla.org/zh-CN/docs/Web/CSS/display), [calc()](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc), [flex](https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex)
55

6-
> 44 年前我们就把人类送上月球了,但现在我们仍然无法在 CSS 中实现垂直居中。” [——James Anderson](/centering-known)
6+
> "44 year ago we put a man on the moon,yet we still can't vertically centre things in CSS。" [——James Anderson](/centering-known)
77
8-
以下的所有实现方案,笔者都在项目中验证过,每种方法都有自己的利与弊,大家可以根据具体的需求,选择最适合的方案。
8+
All the practices mentioned in the following part, I have experimented it on my own project. Those practices have both advantages and disadvantages. You guys can pick the most suitable solution according to your preference.
99

10-
> `display: flex` + `margin: auto` 不限定宽高 :thumbsup:
10+
> `display: flex` + `margin: auto` no limit to width & height :thumbsup:
1111
1212
<vuep template="#flex"></vuep>
1313

@@ -36,7 +36,7 @@
3636
</script>
3737
</script>
3838

39-
> `display: grid` 不限定宽高 :thumbsup:
39+
> `display: grid` no limit to width & height :thumbsup:
4040
4141
<vuep template="#grid"></vuep>
4242

@@ -66,7 +66,7 @@
6666
</script>
6767
</script>
6868

69-
> 绝对定位 `position: absolute` 限定宽高
69+
> absolute-positioned `position: absolute` limit the width & height
7070
7171
<vuep template="#position"></vuep>
7272

@@ -98,7 +98,7 @@
9898
</script>
9999
</script>
100100

101-
> 绝对定位 `position: absolute` + `calc()` 限定宽高
101+
> absolute-positioned `position: absolute` + `calc()` limit the width & height
102102
103103
<vuep template="#calc"></vuep>
104104

@@ -129,7 +129,7 @@
129129
</script>
130130
</script>
131131

132-
> 绝对定位 `position: absolute` + `translate` 不限定宽高 :thumbsup:
132+
> absolute-positioned `position: absolute` + `translate` no limit to width & height :thumbsup:
133133
134134
<vuep template="#translate"></vuep>
135135

@@ -160,7 +160,7 @@
160160
</script>
161161
</script>
162162

163-
> 仿table布局 `display: table/table-cell` + `vertical-align: middle` 不限定宽高
163+
> table-like layout `display: table/table-cell` + `vertical-align: middle` no limit to width & height
164164
165165
<vuep template="#table"></vuep>
166166

@@ -194,7 +194,7 @@
194194
</script>
195195
</script>
196196

197-
> 伪元素 `:after` + `vertical-align:middle` 不限定宽高
197+
> pseudo-elements `:after` + `vertical-align:middle` no limit to width & height
198198
199199
<vuep template="#after"></vuep>
200200

@@ -230,9 +230,9 @@
230230
</script>
231231
</script>
232232

233-
使用`vertical-align`实现居中时,居中元素`display`的值,必须为`inline-block/inline`,否则无法垂直居中,这是因为`vertical-align`只能用来指定行内元素`inline`或表格单元格`table-cell`元素的垂直对齐方式。更多请查看[MDN vertical-align](https://developer.mozilla.org/zh-CN/docs/Web/CSS/vertical-align)
233+
When you are applying the `vertical-align` to achieve the goal of centering, please remeber to set the value of `display` element to `inline-block/inline`, otherwise, you cannot make it center vertically. The reason is that `vertical-align` is utilized to define the way of vertical alignment only for the inline or the table-cell element. Please click [MDN vertical-align](https://developer.mozilla.org/zh-CN/docs/Web/CSS/vertical-align) for more information.
234234

235-
### 浏览器支持
235+
### Browser Support
236236

237237
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=calc&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
238238

circular-smooth.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
# 延轨迹平滑效果
2+
# Circular smooth
33

4-
?> 背景知识:point_right: [animation](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation), [transition](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transition), [transform](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform), [animation-delay](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-delay)
4+
?> Background:point_right: [animation](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation), [transition](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transition), [transform](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform), [animation-delay](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-delay)
55

6-
> “transform-origin 只是一个语法糖而已。实际上你总是可以用 translate() 来代替它。” [——James Anderson](/Aryeh Gregor)
6+
> "Transform-origin is just a syntactic sugar. In fact, you can always use translate() instead." [——James Anderson](/Aryeh Gregor)
77
8-
<vuep template="#circular-smooth"></vuep>
8+
<vuep template="#circular-smooth_tlp"></vuep>
99

10-
<script v-pre type="text/x-template" id="circular-smooth">
10+
<script v-pre type="text/x-template" id="circular-smooth_tlp">
1111
<style>
1212
main {
1313
width: 100%; height: 529px;
@@ -116,9 +116,9 @@
116116
</script>
117117
</script>
118118

119-
!> 如有疑问,后续会添加细节的讲解~
119+
!> If any questions, please keep following the continued explanation.
120120

121-
### 浏览器支持
121+
### Browser Support
122122

123123
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-animation&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
124124

circular-text.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
# 环形文字
2+
# Circular text
33

4-
?> 背景知识:point_right: [SVG](https://developer.mozilla.org/zh-CN/docs/Web/SVG), [transition](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transition)
4+
?> Background:point_right: [SVG](https://developer.mozilla.org/zh-CN/docs/Web/SVG), [transition](https://developer.mozilla.org/zh-CN/docs/Web/CSS/transition)
55

6-
<vuep template="#circular-text"></vuep>
6+
<vuep template="#circular-text_tlp"></vuep>
77

8-
<script v-pre type="text/x-template" id="circular-text">
8+
<script v-pre type="text/x-template" id="circular-text_tlp">
99
<style>
1010
main {
1111
width: 289px; height: 289px;
@@ -45,6 +45,6 @@
4545
</script>
4646
</script>
4747

48-
### 浏览器支持
48+
### Browser Support
4949

5050
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-transitions&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="458px"></iframe>

class-order-layout.md

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11

2-
# 类订单布局
2+
# Class order layout
33

4-
?> 背景知识:point_right: [水平垂直居中](/centering-known)
4+
?> Background:point_right: [centring horizontally & vertically](/centering-known)
55

6-
此布局一般的需求为左侧高度不固定,右侧自适应高度并且居中。
6+
Normaly, this layout do not limit the height of the left side, while right-side should be centred with self-adaptive height.
7+
8+
Requirments for this layout:
79

810
<div align="center" style="border: 1px solid #f5f5f5"><img src="static/interesting-layout-1.jpeg" width="100%" align="center"/></div>
911

10-
> 伪元素 `:after` + `vertical-align:middle` 方案
12+
> pseudo element `:after` + `vertical-align:middle` solution
1113
12-
<vuep template="#class-order-layout"></vuep>
14+
<vuep template="#class-order-layout_tlp"></vuep>
1315

14-
<script v-pre type="text/x-template" id="class-order-layout">
16+
<script v-pre type="text/x-template" id="class-order-layout_tlp">
1517
<style>
1618
main {
1719
width: 100%;
@@ -73,8 +75,8 @@
7375
<span class="left">
7476
<div v-for="ele in elements" @click="handleClick" class="item">{{symbol}}</div>
7577
</span>
76-
<span class="center">垂直居中<br>垂直居中垂直居中垂直居中</span>
77-
<span class="right">垂直居中</span>
78+
<span class="center">Vertical centering<br>Vertical centering Vertical centering</span>
79+
<span class="right">Vertical centering</span>
7880
</section>
7981
</main>
8082
</template>
@@ -101,11 +103,11 @@
101103
</script>
102104
</script>
103105

104-
### 浏览器支持
106+
### Browser Support
105107

106108
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-sel3&amp;periods=future_1,current,past_1,past_2,past_3&amp;accessible-colours=false" frameborder="0" width="100%" height="453px"></iframe>
107109

108-
> 伪元素 `display: flex` 方案
110+
> pseudo element `display: flex` solution
109111
110112
<vuep template="#layout-flexbox"></vuep>
111113

@@ -155,8 +157,8 @@
155157
<span class="left">
156158
<div v-for="ele in elements" @click="handleClick" class="item">{{symbol}}</div>
157159
</span>
158-
<span class="center">垂直居中<br>垂直居中垂直居中垂直居中</span>
159-
<span class="right">垂直居中</span>
160+
<span class="center">vertical centering<br>vertical centering</span>
161+
<span class="right">vertical centering</span>
160162
</section>
161163
</main>
162164
</template>
@@ -183,11 +185,11 @@
183185
</script>
184186
</script>
185187

186-
### 浏览器支持
188+
### Browser Support
187189

188190
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=flexbox&amp;periods=future_1,current,past_1,past_2&amp;accessible-colours=false" frameborder="0" width="100%" height="418px"></iframe>
189191

190-
> 伪元素 `display: grid` 方案 :thumbsup:
192+
> pseudo element `display: grid` solution :thumbsup:
191193
192194
<vuep template="#layout-grid"></vuep>
193195

@@ -229,8 +231,8 @@
229231
<span class="left">
230232
<div v-for="ele in elements" @click="handleClick" class="item">{{symbol}}</div>
231233
</span>
232-
<span class="center">垂直居中<br>垂直居中垂直居中垂直居中</span>
233-
<span class="right">垂直居中</span>
234+
<span class="center">vertical centering<br>vertical centering</span>
235+
<span class="right">vertical centering</span>
234236
</section>
235237
</main>
236238
</template>
@@ -257,6 +259,6 @@
257259
</script>
258260
</script>
259261

260-
### 浏览器支持
262+
### Browser Support
261263

262264
<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-grid&amp;periods=future_1,current,past_1,past_2&amp;accessible-colours=false" frameborder="0" width="100%" height="400px" style="height: 418px;"></iframe>

0 commit comments

Comments
 (0)