Commit 6dea0a1eb3c554e588b6dde245bbda5f80cdad25
1 parent
f9797cf0
[年会抽奖]调整弹幕字体大小
Showing
1 changed file
with
4 additions
and
4 deletions
barrage.html
@@ -31,17 +31,17 @@ | @@ -31,17 +31,17 @@ | ||
31 | socket.on('barrage', function(msg) { | 31 | socket.on('barrage', function(msg) { |
32 | // console.log('socket.on: ', msg); | 32 | // console.log('socket.on: ', msg); |
33 | var colorIndex = Math.floor(Math.random() * (2 - 0 + 1)); // 生成 0-2 随机数 | 33 | var colorIndex = Math.floor(Math.random() * (2 - 0 + 1)); // 生成 0-2 随机数 |
34 | - topNum = Math.floor(Math.random() * (10 - 1 + 1) + 1); // 生成 1-10 随机数 | 34 | + topNum = Math.floor(Math.random() * (8 - 1 + 1) + 1); // 生成 1-10 随机数 |
35 | while (topNum === oldTopNum) { | 35 | while (topNum === oldTopNum) { |
36 | - topNum = Math.floor(Math.random() * (10 - 1 + 1) + 1); | 36 | + topNum = Math.floor(Math.random() * (8 - 1 + 1) + 1); |
37 | } | 37 | } |
38 | danmaku.emit({ | 38 | danmaku.emit({ |
39 | text: msg, | 39 | text: msg, |
40 | style: { | 40 | style: { |
41 | - fontSize: '40px', | 41 | + fontSize: '60px', |
42 | fontWeight: '500', | 42 | fontWeight: '500', |
43 | color: colors[colorIndex], | 43 | color: colors[colorIndex], |
44 | - top: topNum * 50 + 'px' | 44 | + top: topNum * 70 + 'px' |
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | oldTopNum = topNum; | 47 | oldTopNum = topNum; |