超酷的CSS3动画遮罩效果的图片文字说明

 CSS3动画遮罩特效,当你把鼠标放在图片上的时候,可看到图片上出现动态效果的文字提示效果,不要以为使用了JavaScript生成了本效果,其实它是用CSS3技术实现的页面动画,虽然没有那么流畅,但用CSS来实现,已经很难得了。  


点击(此处)折叠或打开

  1. <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
  2. <html>
  3.     <head>
  4.         <title>超酷的CSS3动画遮罩效果的图片文字说明</title>
  5.         <style type=text/css>
  6.             /*base*/
  7.             html, body, div, span, applet, object, iframe,
  8.             h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  9.             a, abbr, acronym, address, big, cite, code,
  10.             del, dfn, em, font, img, ins, kbd, q, s, samp,
  11.             small, strike, strong, sub, sup, tt, var,
  12.             b, u, i, center,
  13.             dl, dt, dd, ol, ul, li,
  14.             fieldset, form, label, legend,
  15.             table, caption, tbody, tfoot, thead, tr, th, td {
  16.              margin: 0;
  17.              padding: 0;
  18.              border: 0;
  19.              outline: 0;
  20.              font-size: 100%;
  21.              vertical-align: baseline;
  22.              background: transparent;
  23.             }
  24.             body {
  25.              line-height: normal;
  26.                 font-family:\'Microsoft Yahei\',Tahoma,Arial,Helvetica,Simsun,STHeiti;
  27.                 word-break: normal;
  28.             }
  29.             
  30.             ol, ul , li{
  31.              list-style: none;
  32.             }
  33.             blockquote, q {
  34.              quotes: none;
  35.             }
  36.             blockquote:before, blockquote:after, q:before, q:after {
  37.              content: \'\';
  38.              content: none;
  39.             }
  40.             pre{
  41.                 white-space:pre-wrap;
  42.             }
  43.             /* remember to define focus styles! */
  44.             :focus {
  45.              outline:0;
  46.             }
  47.             /* remember to highlight inserts somehow! */
  48.             ins {
  49.              text-decoration: none;
  50.             }
  51.             del {
  52.              text-decoration: line-through;
  53.             }
  54.             /* tables still need \'cellspacing=\"0\"\' in the markup */
  55.             table {
  56.              border-collapse: collapse;
  57.              border-spacing: 0;
  58.             }
  59.             .clearfix:before, .clearfix:after {
  60.              content: \'\\0020\';
  61.              display: block;
  62.              overflow: hidden;
  63.              visibility: hidden;
  64.              width: 0;
  65.              height: 0;
  66.             }
  67.             .clearfix:after {
  68.              clear: both;
  69.             }
  70.             .clearfix {
  71.              zoom: 1;
  72.             }
  73.             h1{font-size:16px}
  74.             h2, h3{font-size:14px}
  75.             h4, h5, h6{font-size:12px}
  76.             small{font-size:11px}
  77.             input, option, textarea{font-family:Arial;font-size:12px;}
  78.             .input-text{border:1px solid #888888;padding:2px 3px;}
  79.             /*html5 layout reset*/
  80.             article, aside, dialog, figure, footer, header,
  81.             hgroup, nav, section, figcaption, details, summary {display:block}
  82.             
  83.             /*css3 transform transition*/
  84.             body {background:#999;}
  85.             h1 {margin:50px 50px 0 50px; height:50px; line-height:50px; font-size:28px; color:#000;}
  86.             ul {width:990px; margin:50px auto 0;}
  87.             li {width:320px; height:200px; margin-bottom:20px; border:3px solid #ccc; box-shadow:0 0 1px #000; display:inline-block; overflow:hidden;}

  88.             /*auto------------------------------------------------------------------------------------*/
  89.             .oneDemo, .twoDemo, .threeDemo {width:320px; height:200px; position:relative; margin:0 auto;}
  90.             .transform{height:200px; overflow:hidden;}
  91.             .content {position:absolute; top:0; left:0; overflow:hidden;}
  92.             .content h3, .content p {width:285px; margin:0 auto; text-align:center; overflow:hidden; color:#fff; text-shadow:1px 0 1px #000;}
  93.             .content h3 {height:30px; line-height:30px; font-size:16px;}
  94.             .content p {height:45px; line-height:22px; font-size:14px; }
  95.             .content a {box-shadow:1px 0 1px #000; text-shadow:1px 0 1px #000;}
  96.             
  97.             /*oneDemo--------------------------------------------------------------------------------*/
  98.             .oneDemo .mask {position:absolute; top:0; left:0; display:block; width:360px; height:400px; opacity:1; background:rgba(230, 230, 230, 0.5);}
  99.             .oneDemo .mask-top {right:0; left:auto;
  100.                         -moz-transform:rotate(58.5deg) translate(-424px, -65px); -webkit-transform:rotate(58.5deg) translate(-424px,-65px);
  101.             }
  102.             .oneDemo .mask-bottom {top:0; left:0;
  103.                         -moz-transform:rotate(58.9deg) translate(253px,-45px); -webkit-transform:rotate(58.9deg) translate(253px,-45px);
  104.             }
  105.             .oneDemo .mask-top, .oneDemo .mask-bottom {opactiy:1;
  106.                         -moz-transition:all 0.3s ease-in-out 0.6s; -webkit-transition:all 0.3s ease-in-out 0.6s;
  107.             }
  108.             .oneDemo:hover .mask-top {
  109.                         -moz-transform:rotate(57.9deg) translate(-253px, -65px); -webkit-transform:rotate(57.9deg) translate(-253px,-65px);
  110.             }
  111.             .oneDemo:hover .mask-bottom {
  112.                         -moz-transform:rotate(57.9deg) translate(85px, -31px); -webkit-transform:rotate(57.9deg) translate(85px,-31px);
  113.             }
  114.             .oneDemo:hover .mask-top, .oneDemo:hover .mask-bottom, .oneDemo:hover .content {
  115.                         -moz-transition-delay:0.1s; -webkit-transition-delay:0.1s;    
  116.             }
  117.             .oneDemo .content {height:0; width:320px; background:rgba(110, 120, 110, 0.8); color:#fff; font-size:14px;
  118.                         -moz-transform:rotate(-40deg) translate(-100px, 100px); -webkit-transform:rotate(-40deg) translate(-100px, 100px);
  119.                         -moz-transition:all 0.2s ease-in-out 0.3s; -webkit-transition:all 0.2s ease-in-out 0.3s;
  120.             }
  121.             .oneDemo:hover .content {width:280px; height:60px; margin-top:50px; padding:20px;
  122.                         -moz-transform:rotate(0) translate(0); -webkit-transform:rotate(0) translate(0);
  123.             }

  124.             /*twoDemo----------------------------------------------------------------------------------*/
  125.             .twoDemo .content {height:200px; padding:0 20px; position:absolute; top:0; left:0; display:block; opacity:0; background:rgba(130, 130, 130, 0.5);
  126.                              -moz-transform:translate(460px, -100px) rotate(180deg); -webkit-transform:translate(460px, -100px) rotate(180deg);
  127.                  -moz-transition:all 0.2s ease-in-out 0.4s; -webkit-transition:all 0.2s ease-in-out 0.4s;
  128.                  opacity:0;
  129.             }
  130.             .twoDemo:hover .content {opacity:1;
  131.                         -moz-transform:translate(0) rotate(0); -webkit-transform:translate(0) rotate(0);
  132.                         -moz-transition-delay:0s; -webkit-transition-delay:0s;
  133.             }
  134.             .twoDemo .content h3 {margin:30px auto 0; background:rgba(110, 120, 110, 0.8); box-shadow:1px 0 1px #000;
  135.                         -moz-transform:translateY(-100px); -webkit-transform:translateY(-100px);
  136.                         -moz-transition:all 0.2s ease-in-out 0s; -webkit-transtiton:all 0.2s ease-in-out 0s;
  137.             }
  138.             .twoDemo .content:hover h3 {
  139.                         -moz-transform:translateY(0px); -webkit-transform:translateY(0px);
  140.                         -moz-tarnsition-delay:0.5s; -webkit-transition-delay:0.5s;
  141.             }
  142.             .twoDemo .content p {text-align:center; margin-top:20px;
  143.                         -moz-transform:translateX(300px) rotate(90deg); -webkit-transform:translateX(300px) rotate(90deg);
  144.                         -moz-transition:all 0.4s ease-in-out 0s; -webkit-transition:all 0.4s ease-in-out 0s;
  145.             }
  146.             .twoDemo .content:hover p {-moz-transform:translateX(0) rotate(0); -webkit-transform:translateX(0) rotate(0);}
  147.             .twoDemo .content a {display:block; width:80px; margin:20px 0 0 0; height:30px; font-size:14px; color:#fff; background:rgba(110, 120, 110, 0.8); text-decoration:none; line-height:30px; text-align:center;
  148.                         -moz-transform:translateX(-300px) rotate(-90deg); -webkit-transform:translateX(-300px) rotate(-90deg);
  149.                         -moz-transition:all 0.5s ease-in-out 0s; -webkit-transition:all 0.5s ease-in-out 0s;
  150.             }
  151.             .twoDemo .content:hover a {-moz-transform:translateX(0) rotate(0); -webkit-transform:translateX(0) rotate(0);}

  152.             /*threeDemo----------------------------------------------------------*/
  153.             .threeDemo .transform {-moz-transition:all 1s ease-in 0.1s; -webkit-transition:all 1s ease-in 0.1s;}
  154.             .threeDemo:hover .transform {-moz-transform:rotate(720deg) scale(0); -webkit-transform:rotate(720deg) scale(0);}
  155.             .threeDemo .content {height:200px; padding:0 20px; top:-200px; opactiy:0;background-color:rgba(200, 200, 200, 0.5);
  156.                         -moz-transition:all 0.3s ease-out 0.5s; -webkit-transition:all 0.3s ease-out 0.5s;
  157.             }
  158.             .threeDemo:hover .content {top:0; opactiy:1;
  159.                         -moz-animation:0.9s linear 0s normal none 1 bounceY; -webkit-animation:0.9s linear 0s normal none 1 bounceY;
  160.                         -moz-transition-delay:0s; -webkit-transition-delay:0s;
  161.             }
  162.             .threeDemo .content h3 {margin:30px auto 0; background:rgba(110, 120, 110, 0.8); box-shadow:1px 0 1px #000;
  163.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  164.                         -moz-transition:all 0.6s ease-in-out 0.1s; -webkit-transition:all 0.6s ease-in-out 0.1s;
  165.             }
  166.             .threeDemo .content:hover h3 {
  167.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  168.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  169.             }
  170.             .threeDemo .content p {margin-top:20px;
  171.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  172.                         -moz-transition:all 0.4s ease-in-out 0.1s; -webkit-transition:all 0.4s ease-in-out 0.1s;
  173.             }
  174.             .threeDemo .content:hover p {
  175.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  176.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  177.             }
  178.             .threeDemo .content a {display:block; width:80px; margin:20px 0 0 0; height:30px; font-size:14px; color:#fff; background:rgba(110, 120, 110, 0.8); text-decoration:none; line-height:30px; text-align:center;
  179.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  180.                         -moz-transition:all 0.2s ease-in-out 0.1s; -webkit-transition:all 0.2s ease-in-out 0.1s;
  181.             }
  182.             .threeDemo .content:hover a {
  183.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  184.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  185.             }
  186.             @-moz-keyframes bounceY {
  187.              0% { -moz-transform: translateY(-200px);}
  188.              40% { -moz-transform: translateY(-180px);}
  189.              65% { -moz-transform: translateY(-102px);}
  190.              82% { -moz-transform: translateY(-75px);}
  191.              92% { -moz-transform: translateY(-32px);}
  192.              55%, 75%, 87%, 97%, 100% { -moz-transform: translateY(0px);}
  193.             }
  194.             @-webkit-keyframes bounceY {
  195.              0% { -webkit-transform: translateY(-200px);}
  196.              40% { -webkit-transform: translateY(-180px);}
  197.              65% { -webkit-transform: translateY(-102px);}
  198.              82% { -webkit-transform: translateY(-75px);}
  199.              92% { -webkit-transform: translateY(-32px);}
  200.              55%, 75%, 87%, 97%, 100% { -webkit-transform: translateY(0px);}
  201.             }
  202.         </style>
  203.     </head>
  204.     <body>
  205.         <h1>CSS3 transform transition animation</h1>

  206.         <ul>
  207.             <li>
  208.                 <div class=\"oneDemo\">
  209.                     <img class=\"transform\" src=\"/images/m01.jpg\" />
  210.                     <div class=\"mask mask-top\"></div>
  211.                     <div class=\"mask mask-bottom\"></div>
  212.                     <div class=\"content\">
  213.                         <h3>LANCER EVOLUTION</h3>

  214.                         <p>Lancer Evo.X外观造型与概念车Concept X相似度高达90%以上,动力方面名机4G63从此下台一鞠躬,取而代之的是铝合金汽缸盖且新开发4B11引擎,在涡轮增压的加持下,直四2.0升发动机可输出超过300hp。</p>
  215.                     </div>
  216.                 </div>
  217.             </li>
  218.             <li>
  219.                 <div class=\"twoDemo\">
  220.                     <img class=\"transform\" src=\"/images/m02.jpg\" />
  221.                     <div class=\"content\">

  222.                         <h3>写给未来——我的Mr right</h3>
  223.                         <p>我不知道你会在什么时间 什么地点 什么场合?出现可是 我想你遇到我的时候可以一眼就把我认出来,就像我一直坚信我会在见到你的第一眼就认出你一样。</p>
  224.                         <a href=\"#\">Mr right</a>
  225.                     </div>
  226.                 </div>
  227.             </li>
  228.             <li>

  229.                 <div class=\"threeDemo\">
  230.                     <img class=\"transform\" src=\"/images/m03.jpg\" />
  231.                     <div class=\"content\">
  232.                         <h3>EURO2012</h3>
  233.                         <p>舍不得你离开,但是不得不离开。这不是无奈,这是竞技体育的残酷。英雄般的倒下让我更加难过,但是很欣慰,哎哟喂,太矛盾了。精彩的比赛,我却不敢看上一遍,只怕。。。”</p>
  234.                         <a href=\"#\">EURO</a>
  235.                     </div>

  236.                 </div>
  237.             </li>
  238.         </ul>
  239.     </body>
  240. </html>


点击(此处)折叠或打开

  1. <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
  2. <html>
  3.     <head>
  4.         <title>超酷的CSS3动画遮罩效果的图片文字说明丨芯晴网页特效丨CsrCode.CN</title>
  5.         <style type=text/css>
  6.             /*base*/
  7.             html, body, div, span, applet, object, iframe,
  8.             h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  9.             a, abbr, acronym, address, big, cite, code,
  10.             del, dfn, em, font, img, ins, kbd, q, s, samp,
  11.             small, strike, strong, sub, sup, tt, var,
  12.             b, u, i, center,
  13.             dl, dt, dd, ol, ul, li,
  14.             fieldset, form, label, legend,
  15.             table, caption, tbody, tfoot, thead, tr, th, td {
  16.              margin: 0;
  17.              padding: 0;
  18.              border: 0;
  19.              outline: 0;
  20.              font-size: 100%;
  21.              vertical-align: baseline;
  22.              background: transparent;
  23.             }
  24.             body {
  25.              line-height: normal;
  26.                 font-family:\'Microsoft Yahei\',Tahoma,Arial,Helvetica,Simsun,STHeiti;
  27.                 word-break: normal;
  28.             }
  29.             
  30.             ol, ul , li{
  31.              list-style: none;
  32.             }
  33.             blockquote, q {
  34.              quotes: none;
  35.             }
  36.             blockquote:before, blockquote:after, q:before, q:after {
  37.              content: \'\';
  38.              content: none;
  39.             }
  40.             pre{
  41.                 white-space:pre-wrap;
  42.             }
  43.             /* remember to define focus styles! */
  44.             :focus {
  45.              outline:0;
  46.             }
  47.             /* remember to highlight inserts somehow! */
  48.             ins {
  49.              text-decoration: none;
  50.             }
  51.             del {
  52.              text-decoration: line-through;
  53.             }
  54.             /* tables still need \'cellspacing=\"0\"\' in the markup */
  55.             table {
  56.              border-collapse: collapse;
  57.              border-spacing: 0;
  58.             }
  59.             .clearfix:before, .clearfix:after {
  60.              content: \'\\0020\';
  61.              display: block;
  62.              overflow: hidden;
  63.              visibility: hidden;
  64.              width: 0;
  65.              height: 0;
  66.             }
  67.             .clearfix:after {
  68.              clear: both;
  69.             }
  70.             .clearfix {
  71.              zoom: 1;
  72.             }
  73.             h1{font-size:16px}
  74.             h2, h3{font-size:14px}
  75.             h4, h5, h6{font-size:12px}
  76.             small{font-size:11px}
  77.             input, option, textarea{font-family:Arial;font-size:12px;}
  78.             .input-text{border:1px solid #888888;padding:2px 3px;}
  79.             /*html5 layout reset*/
  80.             article, aside, dialog, figure, footer, header,
  81.             hgroup, nav, section, figcaption, details, summary {display:block}
  82.             
  83.             /*css3 transform transition*/
  84.             body {background:#999;}
  85.             h1 {margin:50px 50px 0 50px; height:50px; line-height:50px; font-size:28px; color:#000;}
  86.             ul {width:990px; margin:50px auto 0;}
  87.             li {width:320px; height:200px; margin-bottom:20px; border:3px solid #ccc; box-shadow:0 0 1px #000; display:inline-block; overflow:hidden;}

  88.             /*auto------------------------------------------------------------------------------------*/
  89.             .oneDemo, .twoDemo, .threeDemo {width:320px; height:200px; position:relative; margin:0 auto;}
  90.             .transform{height:200px; overflow:hidden;}
  91.             .content {position:absolute; top:0; left:0; overflow:hidden;}
  92.             .content h3, .content p {width:285px; margin:0 auto; text-align:center; overflow:hidden; color:#fff; text-shadow:1px 0 1px #000;}
  93.             .content h3 {height:30px; line-height:30px; font-size:16px;}
  94.             .content p {height:45px; line-height:22px; font-size:14px; }
  95.             .content a {box-shadow:1px 0 1px #000; text-shadow:1px 0 1px #000;}
  96.             
  97.             /*oneDemo--------------------------------------------------------------------------------*/
  98.             .oneDemo .mask {position:absolute; top:0; left:0; display:block; width:360px; height:400px; opacity:1; background:rgba(230, 230, 230, 0.5);}
  99.             .oneDemo .mask-top {right:0; left:auto;
  100.                         -moz-transform:rotate(58.5deg) translate(-424px, -65px); -webkit-transform:rotate(58.5deg) translate(-424px,-65px);
  101.             }
  102.             .oneDemo .mask-bottom {top:0; left:0;
  103.                         -moz-transform:rotate(58.9deg) translate(253px,-45px); -webkit-transform:rotate(58.9deg) translate(253px,-45px);
  104.             }
  105.             .oneDemo .mask-top, .oneDemo .mask-bottom {opactiy:1;
  106.                         -moz-transition:all 0.3s ease-in-out 0.6s; -webkit-transition:all 0.3s ease-in-out 0.6s;
  107.             }
  108.             .oneDemo:hover .mask-top {
  109.                         -moz-transform:rotate(57.9deg) translate(-253px, -65px); -webkit-transform:rotate(57.9deg) translate(-253px,-65px);
  110.             }
  111.             .oneDemo:hover .mask-bottom {
  112.                         -moz-transform:rotate(57.9deg) translate(85px, -31px); -webkit-transform:rotate(57.9deg) translate(85px,-31px);
  113.             }
  114.             .oneDemo:hover .mask-top, .oneDemo:hover .mask-bottom, .oneDemo:hover .content {
  115.                         -moz-transition-delay:0.1s; -webkit-transition-delay:0.1s;    
  116.             }
  117.             .oneDemo .content {height:0; width:320px; background:rgba(110, 120, 110, 0.8); color:#fff; font-size:14px;
  118.                         -moz-transform:rotate(-40deg) translate(-100px, 100px); -webkit-transform:rotate(-40deg) translate(-100px, 100px);
  119.                         -moz-transition:all 0.2s ease-in-out 0.3s; -webkit-transition:all 0.2s ease-in-out 0.3s;
  120.             }
  121.             .oneDemo:hover .content {width:280px; height:60px; margin-top:50px; padding:20px;
  122.                         -moz-transform:rotate(0) translate(0); -webkit-transform:rotate(0) translate(0);
  123.             }

  124.             /*twoDemo----------------------------------------------------------------------------------*/
  125.             .twoDemo .content {height:200px; padding:0 20px; position:absolute; top:0; left:0; display:block; opacity:0; background:rgba(130, 130, 130, 0.5);
  126.                              -moz-transform:translate(460px, -100px) rotate(180deg); -webkit-transform:translate(460px, -100px) rotate(180deg);
  127.                  -moz-transition:all 0.2s ease-in-out 0.4s; -webkit-transition:all 0.2s ease-in-out 0.4s;
  128.                  opacity:0;
  129.             }
  130.             .twoDemo:hover .content {opacity:1;
  131.                         -moz-transform:translate(0) rotate(0); -webkit-transform:translate(0) rotate(0);
  132.                         -moz-transition-delay:0s; -webkit-transition-delay:0s;
  133.             }
  134.             .twoDemo .content h3 {margin:30px auto 0; background:rgba(110, 120, 110, 0.8); box-shadow:1px 0 1px #000;
  135.                         -moz-transform:translateY(-100px); -webkit-transform:translateY(-100px);
  136.                         -moz-transition:all 0.2s ease-in-out 0s; -webkit-transtiton:all 0.2s ease-in-out 0s;
  137.             }
  138.             .twoDemo .content:hover h3 {
  139.                         -moz-transform:translateY(0px); -webkit-transform:translateY(0px);
  140.                         -moz-tarnsition-delay:0.5s; -webkit-transition-delay:0.5s;
  141.             }
  142.             .twoDemo .content p {text-align:center; margin-top:20px;
  143.                         -moz-transform:translateX(300px) rotate(90deg); -webkit-transform:translateX(300px) rotate(90deg);
  144.                         -moz-transition:all 0.4s ease-in-out 0s; -webkit-transition:all 0.4s ease-in-out 0s;
  145.             }
  146.             .twoDemo .content:hover p {-moz-transform:translateX(0) rotate(0); -webkit-transform:translateX(0) rotate(0);}
  147.             .twoDemo .content a {display:block; width:80px; margin:20px 0 0 0; height:30px; font-size:14px; color:#fff; background:rgba(110, 120, 110, 0.8); text-decoration:none; line-height:30px; text-align:center;
  148.                         -moz-transform:translateX(-300px) rotate(-90deg); -webkit-transform:translateX(-300px) rotate(-90deg);
  149.                         -moz-transition:all 0.5s ease-in-out 0s; -webkit-transition:all 0.5s ease-in-out 0s;
  150.             }
  151.             .twoDemo .content:hover a {-moz-transform:translateX(0) rotate(0); -webkit-transform:translateX(0) rotate(0);}

  152.             /*threeDemo----------------------------------------------------------*/
  153.             .threeDemo .transform {-moz-transition:all 1s ease-in 0.1s; -webkit-transition:all 1s ease-in 0.1s;}
  154.             .threeDemo:hover .transform {-moz-transform:rotate(720deg) scale(0); -webkit-transform:rotate(720deg) scale(0);}
  155.             .threeDemo .content {height:200px; padding:0 20px; top:-200px; opactiy:0;background-color:rgba(200, 200, 200, 0.5);
  156.                         -moz-transition:all 0.3s ease-out 0.5s; -webkit-transition:all 0.3s ease-out 0.5s;
  157.             }
  158.             .threeDemo:hover .content {top:0; opactiy:1;
  159.                         -moz-animation:0.9s linear 0s normal none 1 bounceY; -webkit-animation:0.9s linear 0s normal none 1 bounceY;
  160.                         -moz-transition-delay:0s; -webkit-transition-delay:0s;
  161.             }
  162.             .threeDemo .content h3 {margin:30px auto 0; background:rgba(110, 120, 110, 0.8); box-shadow:1px 0 1px #000;
  163.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  164.                         -moz-transition:all 0.6s ease-in-out 0.1s; -webkit-transition:all 0.6s ease-in-out 0.1s;
  165.             }
  166.             .threeDemo .content:hover h3 {
  167.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  168.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  169.             }
  170.             .threeDemo .content p {margin-top:20px;
  171.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  172.                         -moz-transition:all 0.4s ease-in-out 0.1s; -webkit-transition:all 0.4s ease-in-out 0.1s;
  173.             }
  174.             .threeDemo .content:hover p {
  175.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  176.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  177.             }
  178.             .threeDemo .content a {display:block; width:80px; margin:20px 0 0 0; height:30px; font-size:14px; color:#fff; background:rgba(110, 120, 110, 0.8); text-decoration:none; line-height:30px; text-align:center;
  179.                         -moz-transform:translateY(-200px); -webkit-transform:translateY(-200px);
  180.                         -moz-transition:all 0.2s ease-in-out 0.1s; -webkit-transition:all 0.2s ease-in-out 0.1s;
  181.             }
  182.             .threeDemo .content:hover a {
  183.                         -moz-transform:translateY(0); -webkit-transform:translateY(0);
  184.                         -moz-transition-delay:0; -webkit-transition-delay:0;
  185.             }
  186.             @-moz-keyframes bounceY {
  187.              0% { -moz-transform: translateY(-200px);}
  188.              40% { -moz-transform: translateY(-180px);}
  189.              65% { -moz-transform: translateY(-102px);}
  190.              82% { -moz-transform: translateY(-75px);}
  191.              92% { -moz-transform: translateY(-32px);}
  192.              55%, 75%, 87%, 97%, 100% { -moz-transform: translateY(0px);}
  193.             }
  194.             @-webkit-keyframes bounceY {
  195.              0% { -webkit-transform: translateY(-200px);}
  196.              40% { -webkit-transform: translateY(-180px);}
  197.              65% { -webkit-transform: translateY(-102px);}
  198.              82% { -webkit-transform: translateY(-75px);}
  199.              92% { -webkit-transform: translateY(-32px);}
  200.              55%, 75%, 87%, 97%, 100% { -webkit-transform: translateY(0px);}
  201.             }
  202.         </style>
  203.     </head>
  204.     <body>
  205.         <h1>CSS3 transform transition animation</h1>

  206.         <ul>
  207.             <li>
  208.                 <div class=\"oneDemo\">
  209.                     <img class=\"transform\" src=\"/images/m01.jpg\" />
  210.                     <div class=\"mask mask-top\"></div>
  211.                     <div class=\"mask mask-bottom\"></div>
  212.                     <div class=\"content\">
  213.                         <h3>LANCER EVOLUTION</h3>

  214.                         <p>Lancer Evo.X外观造型与概念车Concept X相似度高达90%以上,动力方面名机4G63从此下台一鞠躬,取而代之的是铝合金汽缸盖且新开发4B11引擎,在涡轮增压的加持下,直四2.0升发动机可输出超过300hp。</p>
  215.                     </div>
  216.                 </div>
  217.             </li>
  218.             <li>
  219.                 <div class=\"twoDemo\">
  220.                     <img class=\"transform\" src=\"/images/m02.jpg\" />
  221.                     <div class=\"content\">

  222.                         <h3>写给未来——我的Mr right</h3>
  223.                         <p>我不知道你会在什么时间 什么地点 什么场合?出现可是 我想你遇到我的时候可以一眼就把我认出来,就像我一直坚信我会在见到你的第一眼就认出你一样。</p>
  224.                         <a href=\"#\">Mr right</a>
  225.                     </div>
  226.                 </div>
  227.             </li>
  228.             <li>

  229.                 <div class=\"threeDemo\">
  230.                     <img class=\"transform\" src=\"/images/m03.jpg\" />
  231.                     <div class=\"content\">
  232.                         <h3>EURO2012</h3>
  233.                         <p>舍不得你离开,但是不得不离开。这不是无奈,这是竞技体育的残酷。英雄般的倒下让我更加难过,但是很欣慰,哎哟喂,太矛盾了。精彩的比赛,我却不敢看上一遍,只怕。。。”</p>
  234.                         <a href=\"#\">EURO</a>
  235.                     </div>

  236.                 </div>
  237.             </li>
  238.         </ul>
  239.     </body>
  240. </html>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29737856/viewspace-1214538/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29737856/viewspace-1214538/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值