Hiệu ứng Tây Du Ký-Thầy trò Đường Tăng đi thỉnh kinh

Chuyến hành trình của 4 thầy trò Đường Tăng sang Tây Trúc thỉnh kinh là một chuyến đi trải qua nhiều thử thách để có thể tìm đến chân kinh.

Hành trình gian nan đầy thú vị này đã được văn học cũng như phim ảnh ghi chép lại khá hấp dẫn và đầy đủ.

Cuộc hành trình đi lấy kinh của 4 thầy trò Đường Tam Tạng bạn cũng có thể tái hiện lại trên blogspot với việc sử dụng css và HTML.

Dưới đây là cách tạo hiệu ứng Thầy trò Đường Tăng đi Tây Trúc thỉnh kinh
Hiệu ứng Tây Du Ký-Thầy trò Đường Tăng đi thỉnh kinh

Demo xem tại:
DEMO
Thêm css
* {
  padding: 0;
  margin: 0;
  list-style: none;
 }
 html,body {
  height: 100%;
 }
 .main {
  height: 100%;
  width: 100%;
  -webkit-background-size: cover;
  background-size: cover;
  overflow: hidden;
  position: relative;
 }
 .main ul {
  height: 100%;
  width: 3920px;
  position: absolute;
  top: 0;
  left: 0;
  animation: dong 50s linear infinite;
 }
 @keyframes dong {
  0% {
   left: 0;
  }
  100% {
   left: 1920px;
  }
 }
 .main ul li {
  height: 100%;
  width: 100%;
  background: url(https://4.bp.blogspot.com/-3VFQdw2cOq8/W0LSgNzHh8I/AAAAAAAACXc/r72BlIYiId0VDoBMsjzuDqb9pDgjvjWbQCLcBGAs/s1600/2.jpg);
  float: left;
  margin-left: -2000px;
 }
 .wk {
  z-index: 999;
  width: 200px;
  height: 180px;
  background: url(https://1.bp.blogspot.com/-BgWmhXaRjOo/W0LSgcvCVCI/AAAAAAAACXk/Qt4-8ON3ac8wPvgFJBeeqj3fUPOMw-LUQCLcBGAs/s1600/3.png) 0 0 no-repeat;
  /*margin: 400px auto;*/
  position: absolute;
  top: 55%;
  left: 20%;
  animation: wkzou 1s steps(8) infinite;
 }
 @keyframes wkzou {
  to {
   background-position: -1600px 0;
  }
 }
 .bj {
  z-index: 999;
  width: 200px;
  height: 180px;
  background: url(https://3.bp.blogspot.com/-m1JfSjts0lY/W0LSgDlxe3I/AAAAAAAACXg/tOlL9G62x18LgL4o83PxyYGpGC8rB4H7wCLcBGAs/s1600/4.png) 0 0 no-repeat;
  /*margin: 400px auto;*/
  position: absolute;
  top: 55%;
  left: 35%;
  animation: bjzou 1s steps(8) infinite;
 }
 @keyframes bjzou {
  to {
   background-position: -1600px 0;
  }
 }
 .ts {
  z-index: 999;
  width: 170px;
  height: 240px;
  background: url(https://2.bp.blogspot.com/-OJnegbUvO6U/W0LSg_bKimI/AAAAAAAACXo/znUiDf8IOsIjUH-0VN1a3dzeicDP7i1QgCLcBGAs/s1600/5.png) 0 0 no-repeat;
  /*margin: 400px auto;*/
  position: absolute;
  top: 50%;
  left: 50%;
  animation: tszou 1s steps(8) infinite;
 }
 @keyframes tszou {
  to {
   background-position: -1360px 0;
  }
 }
 .ss {
  z-index: 999;
  width: 210px;
  height: 200px;
  background: url(https://1.bp.blogspot.com/-EWhm-OqVkf0/W0LV2U_jbNI/AAAAAAAACYE/RcY158W0Euk9B-EDrg0pUY2saLxZAcd8QCLcBGAs/s3200/6.png) 0 0 no-repeat;
  /*margin: 400px auto;*/
  position: absolute;
  top: 57%;
  left: 62%;
  animation: sszou 1s steps(8) infinite;
 }
 @keyframes sszou {
  to {
   background-position: -1680px 0;
  }
 }
@media screen and (max-width:640px){.main{max-width:100% !important}}
Thêm HTML
<div class="wk">
</div>
<div class="bj">
</div>
<div class="ts">
</div>
<div class="ss">
</div>
<div class="main">
<ul>
<li></li>
<li></li>
</ul>
</div>
Code là thế nhưng để nó hiển thị tại vị trí cụ thể như ý muốn thì cần chỉnh width,height,top,left...cho phù hợp.
Nguồn: BLOG CHIA SẺ 78 (PHÚ YÊN)(chiase78.blogspot.com)
Publis: 

2 comments

  1. DVD chúc HL tuần mới, ngày mới vui khỏe, thành công, an lành!
    1. Cảm ơn bác đã ghé thăm và ủng hộ động viên.Chúc bác 1 tuần mới vui khỏe anh lành và thành công.:)
🙂😬😀😂🤣😍💖
Windows + . hoặc Windows + ; để chèn emoji