html
html
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="CSS.css">
</head>
<body>
<table>
<tr>
<th id="th1" onmouseover="Change(1)" onmouseout="RBGC(1)">
<p>
Option 1
</p>
</th>
<th id="th2" onmouseover="Change(2)" onmouseout="RBGC(2)">
<p>
Option 2
</p>
</th>
<th id="th3" onmouseover="Change(3)" onmouseout="RBGC(3)">
<p>
Option 3
</p>
</th>
<th id="th4" onmouseover="Change(4)" onmouseout="RBGC(4)">
<p>
Option 4
</p>
</th>
Enter to Rename, Shift+Enter to Preview
css
css
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
body{
display:flex;
align-items:center;
justify-content: center;
min-height:100vh;
background-color:#e0e5eb;
user-select: none;
}
.div{
z-index:-1;
position:absolute;
width:600px;
height:100px;
border-radius: 10px;
background-color: #e0e5eb;
box-shadow:
5px 5px 10px rgb(141, 138, 138),
-5px -5px 10px white;
}
table{
line-height:25px;
}
th{
transition:0.1s;
border:10px solid #e0e5eb;
Enter to Rename, Shift+Enter to Preview
js
js
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
var Name="";
var randon=[parseInt(Math.random()*1000)%255+1,parseInt(Math.random()*1000)%255+1,parseInt(Math.random()*1000)%255+1];
function Change(n){
Name="th"+n;
document.getElementById(Name).style.backgroundColor=clr("bg");
document.getElementById(Name).style.color=clr('c');
document.getElementById(Name).style.border=clr('b');
}
function RBGC(n){
Name="th"+n;
document.getElementById(Name).style.backgroundColor="#e0e5eb";
document.getElementById(Name).style.color="black";
document.getElementById(Name).style.border="10px solid #e0e5eb";
}
function clr(n){
randon=[parseInt(Math.random()*1000)%255+1,parseInt(Math.random()*1000)%255+1,parseInt(Math.random()*1000)%255+1];
if(n=="bg" || n=='b'){
CBorder(randon);
return "rgb("+randon[0]+","+randon[1]+","+randon[2]+")";
}
else if(n=='c'){
var inrandon=[255-randon[0],255-randon[1],255-randon[2]];
return "rgb("+inrandon[0]+","+inrandon[1]+","+inrandon[2]+")";
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run