A Pen by Kamil Kashaev on CodePen.
Last active
April 9, 2019 11:44
-
-
Save mfd/a40f046166e0d0efee0411cb83f26508 to your computer and use it in GitHub Desktop.
Таблица умножения
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = []; | |
for(let i = 1; i < 10; i++) { | |
data[i] = [] | |
for(let j = 1; j < 10; j++) { | |
data[i].push(i*j); | |
} | |
} | |
console.table(data) | |
var html = '<table>'; | |
for (row in data) { | |
html += `<tr>`; | |
for (item in data[row]) { | |
html += `<td>${data[row][item]}</td>`; | |
} | |
html += `</tr>` | |
} | |
html += '</table>'; | |
document.body.innerHTML = html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body | |
font-family: sans-serif | |
table | |
border-collapse: collapse | |
td | |
text-align: right | |
padding: .5em | |
// Cross Hover | |
// | |
table | |
overflow: hidden | |
td, th | |
position: relative | |
outline: 0 | |
body:not(.nohover) tbody tr:hover | |
background-color: #ffa | |
td:hover::after, thead th:not(:empty):hover::after, td:focus::after, thead th:not(:empty):focus::after | |
content: '' | |
height: 10000px | |
left: 0 | |
position: absolute | |
top: -5000px | |
width: 100% | |
z-index: -1 | |
td:hover::after, th:hover::after | |
background-color: #ffa | |
td:focus::after, th:focus::after | |
background-color: lightblue | |
tr:not(:first-child) | |
td:not(:first-child):hover | |
color: green | |
font-weight: bold |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment