PHP & JavaScript Room :: 設置サンプル

実行結果

設置サンプル

animation

アニメーションプロパティを一括指定します。

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta http-equiv="Content-Language" content="ja" />
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
      <meta http-equiv="imagetoolbar" content="no" />
      <title>animation</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
      <style type="text/css">
         #sample {
            width:300px; height:300px;
            background:#eee;
            position:relative;
         }
         #sample p {
            margin:0; padding:0;
            width:10px; height:10px;
            position:absolute;
            top:140px; left:140px;
            line-height:10px;
            text-align:center;
            font-weight:bold;
            font-size:10px;
            color:#ff6699;

            animation:myani 3s 1;
            /* Firefox */
            -moz-animation:myani 1s ease-in 2s infinite alternate;
            /* Chrome, Safari */
            -webkit-animation:myani 2s ease-in 2s infinite alternate;
         }
         @keyframes myani {
             100% {left:50px; top:50px; width:300px; height:200px; line-height:200px; font-size:100px; }
         }
         @-moz-keyframes myani {
             100% {left:50px; top:50px; width:200px; height:200px; line-height:200px; font-size:100px; }
         }
         @-webkit-keyframes myani {
             100% {left:0; top:0; width:300px; height:300px; line-height:300px; font-size:300px; }
         }
      </style>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap">
         <h1>設置サンプル</h1>
         <h2>animation</h2>
         <p>アニメーションプロパティを一括指定します。</p>
<!-- CODE -->
         <div id="sample">
            <p>&hearts;</p>
         </div>
<!-- CODE / -->
      </div>
   </body>
</html>