11 |
border-width: 0; |
border-width: 0; |
12 |
padding: 0; |
padding: 0; |
13 |
font-family: "MS Gothic", "Arial", sans-serif; |
font-family: "MS Gothic", "Arial", sans-serif; |
14 |
behavior: url(../implementation/slide-show-winie-slides.htc); |
behavior: expression(function (element) { |
15 |
|
element.currentSlide = 0; |
16 |
|
|
17 |
|
// h|head { display : none } |
18 |
|
var head = element.getElementsByTagName ('head')[0]; |
19 |
|
head.style.display = 'none'; |
20 |
|
|
21 |
|
document.onkeydown = function () { |
22 |
|
var slide = getSlideList (); |
23 |
|
if (event.keyCode == 13 || event.keyCode == 39) { |
24 |
|
element.currentSlide++; |
25 |
|
if (element.currentSlide >= slide.length) element.currentSlide = 0; |
26 |
|
showSlide (element.currentSlide); |
27 |
|
event.returnValue = false; |
28 |
|
} else if (event.keyCode == 8 || event.keyCode == 37) { |
29 |
|
element.currentSlide--; |
30 |
|
if (element.currentSlide < 0) element.currentSlide = slide.length - 1; |
31 |
|
showSlide (element.currentSlide); |
32 |
|
event.returnValue = false; |
33 |
|
} |
34 |
|
} /* keydown */ |
35 |
|
|
36 |
|
element.onmousedown = function () { |
37 |
|
var slide = getSlideList (); |
38 |
|
if (event.button == 1) { |
39 |
|
element.currentSlide++; |
40 |
|
if (element.currentSlide >= slide.length) element.currentSlide = 0; |
41 |
|
showSlide (element.currentSlide); |
42 |
|
event.returnValue = false; |
43 |
|
} |
44 |
|
} |
45 |
|
|
46 |
|
function showSlide (n) { |
47 |
|
var slide = getSlideList (); |
48 |
|
for (var i = 0; i < slide.length; i++) { |
49 |
|
slide[i].runtimeStyle.display = (i == n) ? 'block' : 'none'; |
50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
|
function getSlideList () { |
54 |
|
return window.document.getElementsByTagName ('slide'); |
55 |
|
} |
56 |
|
|
57 |
|
runtimeStyle.behavior = 'none'; |
58 |
|
} (this)); /* NOTE: See also slide-style-winie.css */ |
59 |
} |
} |
60 |
|
|
61 |
/* s|slide */ |
/* s|slide */ |
62 |
slide { |
slide { |
63 |
width: 100%; |
width: 100%; |
64 |
height: 90%; |
height: 100%; |
65 |
margin: 1em; |
border: groove 1px #C0C0C0; |
66 |
border: groove 2px gray; |
font-size: 200%; |
|
font-size: 200%; |
|
67 |
} |
} |