Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
檀越@新空间
Coding Tree
提交
4473287a
C
Coding Tree
项目概览
檀越@新空间
/
Coding Tree
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coding Tree
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4473287a
编写于
2月 13, 2022
作者:
彭世瑜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
cdb2f681
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
251 addition
and
15 deletion
+251
-15
README.md
README.md
+1
-1
blog/front-end-combat/demo/background-image.html
blog/front-end-combat/demo/background-image.html
+10
-0
blog/front-end-combat/demo/transform-3d-perspective.html
blog/front-end-combat/demo/transform-3d-perspective.html
+21
-0
blog/front-end-combat/demo/transform-mask.html
blog/front-end-combat/demo/transform-mask.html
+69
-0
blog/front-end-combat/demo/transform-rotate3d.html
blog/front-end-combat/demo/transform-rotate3d.html
+48
-0
blog/front-end-combat/index.md
blog/front-end-combat/index.md
+3
-1
blog/front-end-combat/transform-3d.md
blog/front-end-combat/transform-3d.md
+72
-0
blog/front-end-combat/transform.md
blog/front-end-combat/transform.md
+16
-0
blog/front-end-learn/index.md
blog/front-end-learn/index.md
+1
-13
doc/html.md
doc/html.md
+8
-0
index.html
index.html
+2
-0
未找到文件。
README.md
浏览文件 @
4473287a
...
...
@@ -39,7 +39,7 @@
本地预览
```
bash
npm i
docsify
-g
npm i
npm run dev
```
...
...
blog/front-end-combat/demo/background-image.html
0 → 100644
浏览文件 @
4473287a
<style>
.box
{
width
:
200px
;
height
:
200px
;
/* 逗号隔开多个值, 从透明到半透明 渐变 */
background-image
:
linear-gradient
(
transparent
,
rgba
(
0
,
0
,
0
,
.5
));
}
</style>
<div
class=
"box"
></div>
\ No newline at end of file
blog/front-end-combat/demo/transform-3d-perspective.html
0 → 100644
浏览文件 @
4473287a
<style>
.box-wrap
{
perspective
:
1000px
;
}
.box
{
margin
:
0
auto
;
width
:
200px
;
height
:
200px
;
background-color
:
skyblue
;
transition
:
all
.5s
;
}
.box
:hover
{
transform
:
translateZ
(
100px
);
}
</style>
<div
class=
"box-wrap"
>
<div
class=
"box"
></div>
</div>
\ No newline at end of file
blog/front-end-combat/demo/transform-mask.html
0 → 100644
浏览文件 @
4473287a
<style>
p
{
margin
:
0
;
padding
:
0
;
}
.box
{
display
:
block
;
width
:
200px
;
height
:
150px
;
margin
:
0
auto
;
position
:
relative
;
overflow
:
hidden
;
}
.box
.cover
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
transition
:
all
0.5s
;
}
.box
.title
{
position
:
absolute
;
width
:
100%
;
height
:
50px
;
padding
:
10px
;
bottom
:
0
;
left
:
0
;
color
:
white
;
box-sizing
:
border-box
;
z-index
:
2
;
}
/* 渐变背景 */
.box
.mask
{
position
:
absolute
;
opacity
:
0
;
transition
:
all
0.5s
;
width
:
100%
;
height
:
100%
;
top
:
0
;
left
:
0
;
background-image
:
linear-gradient
(
transparent
,
rgba
(
0
,
0
,
0
,
.6
));
}
.box
:hover
.mask
{
opacity
:
1
;
}
.box
:hover
.cover
{
transform
:
scale
(
1.2
);
}
</style>
<a
class=
"box"
href=
"#"
>
<img
class=
"cover"
src=
"https://api.isoyu.com/bing_images.php"
alt=
""
>
<div
class=
"title"
>
<p>
百日依山尽
</p>
</div>
<div
class=
"mask"
></div>
</a>
\ No newline at end of file
blog/front-end-combat/demo/transform-rotate3d.html
0 → 100644
浏览文件 @
4473287a
<style>
.box-wrap
{
margin
:
0
auto
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
width
:
640px
;
overflow
:
hidden
;
perspective
:
1000px
;
}
.box
{
width
:
200px
;
height
:
200px
;
/* background-color: skyblue; */
transition
:
all
.5s
;
background-image
:
url('https://api.isoyu.com/bing_images.php')
;
}
.box
.cover
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
}
.box-rotate-z
:hover
{
/* 以z轴为中心点旋转 */
transform
:
rotateZ
(
60deg
);
}
.box-rotate-x
:hover
{
/* 以x轴为中心点旋转 */
transform
:
rotateX
(
60deg
);
}
.box-rotate-y
:hover
{
/* 以y轴为中心点旋转 */
transform
:
rotateY
(
60deg
);
}
</style>
<div
class=
"box-wrap"
>
<div
class=
"box box-rotate-z"
></div>
<div
class=
"box box-rotate-x"
></div>
<div
class=
"box box-rotate-y"
></div>
</div>
\ No newline at end of file
blog/front-end-combat/index.md
浏览文件 @
4473287a
...
...
@@ -6,7 +6,9 @@
2.
[
平面转换 transform
](
blog/front-end-combat/transform.md
)
-
css3 平面空间转换、渐变、动画属性
3.
[
空间转换 transform
](
blog/front-end-combat/transform-3d.md
)
-
css3 平面、渐变、动画属性
-
Flex 布局
-
移动适配
-
响应式 BootStrap 框架
blog/front-end-combat/transform-3d.md
0 → 100644
浏览文件 @
4473287a
# 空间转换(3D 转换)
空间内位移、旋转、缩放
z 轴的正方向指向用户(屏幕外边方向)
语法
```
css
transform
:
translate3d
(
x
,
y
,
z
);
transform
:
translateX
(
x
);
transform
:
translateY
(
y
);
transform
:
translateZ
(
z
);
```
取值:
-
正负均可
-
百分比
-
像素值
## 1、透视
perspective 视线透视效果
透视效果:近大远小,近实远虚
父级添加属性
```
css
/* 透视距离(视距): 人眼睛到屏幕的距离 */
perspective
:
像素值
;
/* (800-1200) */
```
示例:
[](
demo/transform-3d-perspective.html
':include :type=code'
)
[](
demo/transform-3d-perspective.html
':include height=220'
)
## 2、空间旋转 rotate
语法
```
css
transform
:
rotateZ
(
角度
);
transform
:
rotateX
(
角度
);
transform
:
rotateY
(
角度
);
```
示例:
[](
demo/transform-rotate3d.html
':include :type=code'
)
[](
demo/transform-rotate3d.html
':include height=220'
)
## 左手法则: 判断旋转方向
左手握住旋转轴,拇指指向正值方向,手指弯曲方向为旋转正值方向
## rotate3d(了解)
自定义旋转周的位置及旋转角度
```
css
rotate3d
(
x
,
y
,
z
,
角度
);
```
x, y, z 取 0-1 之间的数字
https://www.bilibili.com/video/BV1xq4y1q7jZ?p=34&spm_id_from=pageDriver
\ No newline at end of file
blog/front-end-combat/transform.md
浏览文件 @
4473287a
...
...
@@ -132,3 +132,19 @@ transform: scale(缩放倍数);
[](
demo/transform-scale.html
':include height=270'
)
https://www.bilibili.com/video/BV1xq4y1q7jZ?p=19&spm_id_from=pageDriver
## 渐变背景 background-image
示例 1:
[](
demo/background-image.html
':include :type=code'
)
[](
demo/background-image.html
':include height=220'
)
示例 2:
[](
demo/transform-mask.html
':include :type=code'
)
[](
demo/transform-mask.html
':include height=170'
)
blog/front-end-learn/index.md
浏览文件 @
4473287a
# 笔记:web 前端开发入门
<!-- <a href="/blog/demo/demo.html" target="_blank">
demo
</a>
-->
## 资源
[
2022 年前端学习路线图
](
https://www.bilibili.com/read/cv10431130
)
[
黑马程序员 web 前端开发入门教程,前端零基础 html5+css3+前端项目视频教程
](
https://www.bilibili.com/video/BV1Kg411T7t9
)
[
菜鸟教程-HTML 教程- (HTML5 标准)
](
https://www.runoob.com/html/html-tutorial.html
)
[
https://developer.mozilla.org/zh-CN/
](
https://developer.mozilla.org/zh-CN/
)
## 内容
视频:
[
黑马程序员 web 前端开发入门教程,前端零基础 html5+css3+前端项目视频教程
](
https://www.bilibili.com/video/BV1Kg411T7t9
)
1.
[
HTML 基本认知
](
blog/front-end-learn/html-basic.md
)
...
...
doc/html.md
浏览文件 @
4473287a
...
...
@@ -23,3 +23,11 @@
[
w3school
](
https://www.w3school.com.cn/
)
[
我要自学网-WEB 前端开发视频教程
](
http://www.51zxw.net/list.aspx?cid=393
)
## 资源
[
2022 年前端学习路线图
](
https://www.bilibili.com/read/cv10431130
)
[
菜鸟教程-HTML 教程- (HTML5 标准)
](
https://www.runoob.com/html/html-tutorial.html
)
[
https://developer.mozilla.org/zh-CN/
](
https://developer.mozilla.org/zh-CN/
)
index.html
浏览文件 @
4473287a
...
...
@@ -41,9 +41,11 @@
}
</script>
<script
src=
"//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/prismjs/components/prism-java.min.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/prismjs@1/components/prism-php.min.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/prismjs@1.26.0/components/prism-json.min.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.js"
></script>
<script
src=
"//cdn.jsdelivr.net/npm/docsify-copy-code"
></script>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录