Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_48998305
TRHX-github-io
提交
1d8574e5
T
TRHX-github-io
项目概览
weixin_48998305
/
TRHX-github-io
与 Fork 源项目一致
Fork自
IT.BOB / TRHX-github-io
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TRHX-github-io
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1d8574e5
编写于
5月 18, 2019
作者:
T
TRHX
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Site updated: 2019-05-18 00:37:39
上级
bcc89a4d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
content.json
content.json
+1
-1
js/DigitalRain.js
js/DigitalRain.js
+4
-4
未找到文件。
content.json
浏览文件 @
1d8574e5
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
js/DigitalRain.js
浏览文件 @
1d8574e5
...
...
@@ -13,7 +13,7 @@ window.onload = function(){
canvas
.
width
=
W
;
canvas
.
height
=
H
;
//每个文字的字体大小
var
fontSize
=
1
4
;
var
fontSize
=
1
3
;
//计算列
var
colunms
=
Math
.
floor
(
W
/
fontSize
);
//记录每列文字的y轴坐标
...
...
@@ -23,14 +23,14 @@ window.onload = function(){
drops
.
push
(
0
);
}
//运动的文字
var
str
=
"
welcome to www.itrhx.com
"
;
var
str
=
"
WELCOME TO WWW.ITRHX.COM
"
;
//4:fillText(str,x,y);原理就是去更改y的坐标位置
//绘画的函数
function
draw
(){
context
.
fillStyle
=
"
rgba(238,238,238,.08)
"
;
//遮盖层
context
.
fillRect
(
0
,
0
,
W
,
H
);
//给字体设置样式
context
.
font
=
"
700
"
+
fontSize
+
"
px
微软雅黑
"
;
context
.
font
=
"
700
"
+
fontSize
+
"
px
Georgia
"
;
//给字体添加颜色
context
.
fillStyle
=
[
"
#33B5E5
"
,
"
#0099CC
"
,
"
#AA66CC
"
,
"
#9933CC
"
,
"
#99CC00
"
,
"
#669900
"
,
"
#FFBB33
"
,
"
#FF8800
"
,
"
#FF4444
"
,
"
#CC0000
"
][
parseInt
(
Math
.
random
()
*
10
)];
//randColor();可以rgb,hsl, 标准色,十六进制颜色
//写入画布中
...
...
@@ -53,5 +53,5 @@ window.onload = function(){
return
"
rgb(
"
+
r
+
"
,
"
+
g
+
"
,
"
+
b
+
"
)
"
;
}
draw
();
setInterval
(
draw
,
3
0
);
setInterval
(
draw
,
3
5
);
};
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录