-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.html
51 lines (41 loc) · 938 Bytes
/
test.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
layout: default
title: Klavins Lab | Publications
---
<style>
.multi-heading {
width: 400px;
height: 70px;
border: 0pt solid #eee;
position: relative;
margin-left: auto;
margin-right: auto;
}
.mh-item {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 36px;
color: #eee;
position: absolute;
}
.selected {
color: #000;
}
</style>
<div class='multi-heading'>
<div class='mh-item selected' data-x=200 data-y=18>Papers</div>
<div class='mh-item' data-x=100 data-y=50>Reports</div>
<div class='mh-item' data-x=300 data-y=50>Theses</div>
</div>
<script>
function set_positions() {
$('.mh-item').each(function (x) {
var el = $(this);
var x = el.data('x'), y = el.data('y');
el.css('right', x - el.width() / 2);
el.css('top', y - el.height() / 2);
});
}
$(function () {
set_positions()
});
</script>