-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
32 lines (25 loc) · 820 Bytes
/
script.js
File metadata and controls
32 lines (25 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const btn = document.getElementById('btn')
const group = document.getElementById('group')
const substract = document.getElementById('substract')
const beforeBtn = document.getElementById('before_btn')
const substractPath = document.getElementById('substract_path')
const text = document.getElementById('text')
group.addEventListener('mouseenter', function () {
spreadBtnBorder()
rotateScaleSubstract();
fillButton();
setTimeout(whiteSubstractText, 1500);
})
function rotateScaleSubstract() {
substract.style.transform = 'rotate(360deg) scale(1,1)'
}
function spreadBtnBorder() {
btn.style.width = '281px'
}
function fillButton() {
beforeBtn.style.width = '282px'
}
function whiteSubstractText() {
substractPath.style.fill = 'white';
text.style.webkitTextFillColor = 'unset';
}