読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

impress.jsを試してみた

f:id:shigemk2:20140608232200p:plain

shigemk2/impress-hello · GitHub

とりあえずindex.htmlを大幅に削って

<div id="impress">
    <div id="bored" class="step slide" data-x="-1000" data-y="-1500">
        <q>My Name is <b>shigemk2</b></q>
    </div>
    <div class="step slide" data-x="0" data-y="-1500">
        <q>But <strong>I am not sure</strong> whather I am a good programmer.</q>
    </div>

    <div class="step slide" data-x="1000" data-y="-1500">
        <q>So I will keep trying to study.</q>
    </div>
</div>

<div class="hint">
    <p>Use a spacebar or arrow keys to navigate</p>
</div>
<script>
if ("ontouchstart" in document.documentElement) { 
    document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
}
</script>

<script src="js/impress.js"></script>
<script>impress().init();</script>

こんな感じ。