search
HomeWeb Front-endH5 TutorialThe production process of the 2014 Christmas countdown webpage_html5 tutorial skills

The Christmas season of 2014 is coming. The editor of iCoding shares with you a 2014 Christmas countdown webpage. The date card of the day has a jittering effect. Let’s take a look at the renderings:

Click the mouse before number 5

After clicking No. 5

Implementation code.

 html code:

XML/HTML CodeCopy content to clipboard
  1. h1>  
  2.         Merry Christmash1>  
  3.     ul>  
  4.         li>  
  5.             div class="door">  
  6.                 1div>  
  7.         li>  
  8.         li>  
  9.             div class="door">  
  10.                 2div>  
  11.         li>  
  12.         li>  
  13.             div class="door">  
  14.                 3div>  
  15.         li>  
  16.         li>  
  17.             div class="door">  
  18.                 4div>  
  19.         li>  
  20.         li>  
  21.             div class="door">  
  22.                 5div>  
  23.         li>  
  24.         li>  
  25.             div class="door">  
  26.                 6div>  
  27.         li>  
  28.         li>  
  29.             div class="door">  
  30.                 7div>  
  31.         li>  
  32.         li>  
  33.             div class="door">  
  34.                 8div>  
  35.         li>  
  36.         li>  
  37.             div class="door">  
  38.                 9div>  
  39.         li>  
  40.         li>  
  41.             div class="door">  
  42.                 10div>  
  43.         li>  
  44.         li>  
  45.             div class="door">  
  46.                 11div>  
  47.         li>  
  48.         li>  
  49.             div class="door">  
  50.                 12div>  
  51.         li>  
  52.         li>  
  53.             div class="door">  
  54.                 13div>  
  55.         li>  
  56.         li>  
  57.             div class="door">  
  58.                 14div>  
  59.         li>  
  60.         li>  
  61.             div class="door">  
  62.                 15div>  
  63.         li>  
  64.         li>  
  65.             div class="door">  
  66.                 16div>  
  67.         li>  
  68.         li>  
  69.             div class="door">  
  70.                 17div>  
  71.         li>  
  72.         li>  
  73.             div class="door">  
  74.                 18div>  
  75.         li>  
  76.         li>  
  77.             div class="door">  
  78.                 19div>  
  79.         li>  
  80.         li>  
  81.             div class="door">  
  82.                 20div>  
  83.         li>  
  84.         li>  
  85.             div class="door">  
  86.                 21div>  
  87.         li>  
  88.         li>  
  89.             div class="door">  
  90.                 22div>  
  91.         li>  
  92.         li>  
  93.             div class="door">  
  94.                 23div>  
  95.         li>  
  96.         li>  
  97.             div class="door">  
  98.                 24div>  
  99.         li>  
  100.         li>  
  101.             div class="door">  
  102.                 25div>  
  103.         li>  
  104.     ul>  
  105.     p id="message">  
  106.     p>  

  css3代码:

C/C Code复制内容到剪贴板
  1. body {   
  2.   background: url("xmas.jpg");   
  3.   color: #fff;   
  4.   font-family: 'Oleo Script', cursive;   
  5.   padding: 20px;   
  6.   font-weight: 400;   
  7. }   
  8.   
  9. h1 {   
  10.   margin:0;   
  11.   font-size:75px;   
  12.   line-height: 75px;   
  13.   text-align: center;   
  14.   font-weight: 400;   
  15. }   
  16.   
  17. ul {   
  18.   margin:0 auto 30px auto;   
  19.   padding:0;   
  20.   list-style-type:none;   
  21.   max-width:900px;   
  22.   width: 100%;   
  23.   text-align: center;   
  24.   user-select: none;   
  25. }   
  26.   
  27. li {   
  28.   font-weight: 400;   
  29.   background-color: #fff;   
  30.   box-sizing: border-box;   
  31.   border-radius: 6px;   
  32.   display: inline-block;   
  33.   color:#111;   
  34.   cursor:pointer;   
  35.   font-size: 26px;   
  36.   padding:15px;   
  37.   margin:25px 12px;   
  38.   width: 130px;   
  39.   height:130px;   
  40.   line-height: 100px;   
  41.   text-align:center;   
  42.   position: relative;   
  43.   vertical-align:top;   
  44.   user-select: none;   
  45.   perspective: 800px;   
  46.   transition: all 0.4s ease-in-out;   
  47. }   
  48.   
  49. ul li:last-child {   
  50.   
  51.   background-size:cover;     
  52.   display:block;   
  53.   clear:both;   
  54.   margin: 20px auto 0 auto;   
  55.   width: 200px;   
  56.   height: 275px;   
  57. }   
  58.   
  59. ul li:last-child .door {   
  60.   font-size: 100px;   
  61.   width: 200px;   
  62.   height: 275px;   
  63.   line-height: 240px;   
  64. }  
  65.   
  66. ul li:anak terakhir .didedahkan {   
  67.   ketinggian garisan: 123px;   
  68. }   
  69.   
  70. .pintu {   
  71.   pilihan pengguna: tiada;   
  72.   warna:#fff;   
  73.   saiz fon: 70px;   
  74.   kedudukan: mutlak;   
  75.   atas:0;   
  76.   kiri:0;   
  77.   warna latar belakang: #91c1cc;   
  78.   bersaiz kotak: kotak sempadan;   
  79.   atas sempadan: 2px #eee putus-putus;   
  80.   sempadan-kanan: 2px #eee berputus-putus;   
  81.   bahagian bawah sempadan: 2px #eee putus-putus;   
  82.   sempadan-kiri: 1px #eee pepejal;   
  83.   jejari sempadan: 6px;   
  84.   padding:15px;   
  85.   lebar: 130px;   
  86.   tinggi:130px;   
  87.   asal-ubah: 0 40%;    
  88.   peralihan: semua 0.4s kemudahan masuk;   
  89.   gaya-transform: preserve-3d;   
  90. }   
  91.   
  92. .pintu semasa {   
  93.   warna latar belakang: #7EAD44;   
  94. }   
  95.   
  96. .pintu semasa.terbuka{   
  97.   warna: #7EAD44;   
  98. }   
  99.   
  100. .didedahkan {   
  101.   pilihan pengguna: tiada;   
  102. }   
  103.   
  104. #mesej {   
  105.   bersaiz kotak: kotak sempadan;   
  106.   warna: #222;   
  107.   paparan: tiada;   
  108.   saiz fon: 24px;   
  109.   pelapis: 20px;   
  110.   latar belakang: #eddecb;   
  111.   lebar maksimum: 500px;   
  112.   lebar: 100%;   
  113.   jejari sempadan: 15px;   
  114.   margin: 0 auto;   
  115. }   
  116.   
  117. .buka {   
  118.   bayang kotak: 14px 0px 15px -1px rgba(0,0,0,0.2);   
  119.   warna: #91c1cc;   
  120.   transformasi: putar3d(0, 1, 0, -98deg);   
  121. }   
  122.   
  123. .goyang {   
  124.   animasi: goyang 0.2s tak terhingga;   
  125.   transformasi: putar(-1deg);   
  126. }   
  127.   
  128. @keyframes goyang {   
  129.   0% {   
  130.         transformasi: putar(-1deg);   
  131.   }  
  132.   50% {   
  133.       transformasi: putar(1deg);   
  134.   }   
  135. }   
  136.   
  137. @media skrin dan (min-lebar: 480px) {   
  138.   li {   
  139.     margin:25px 20px;   
  140.   }   
  141. }   
  142.   
  143.   
  144. skrin @media dan (lebar min: 768px) {   
  145.     badan {   
  146.         saiz latar belakang:150px;   
  147.     }   
  148.        
  149.     p {   
  150.         kanan: 6%;   
  151.         atas: 20%;   
  152.         bawah: auto;    
  153.         margin-kiri: auto;   
  154.         kiri: auto;   
  155.     }   
  156. }  
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Connection Between H5 and HTML5: Similarities and DifferencesThe Connection Between H5 and HTML5: Similarities and DifferencesApr 24, 2025 am 12:01 AM

H5 and HTML5 are different concepts: HTML5 is a version of HTML, containing new elements and APIs; H5 is a mobile application development framework based on HTML5. HTML5 parses and renders code through the browser, while H5 applications need to run containers and interact with native code through JavaScript.

The Building Blocks of H5 Code: Key Elements and Their PurposeThe Building Blocks of H5 Code: Key Elements and Their PurposeApr 23, 2025 am 12:09 AM

Key elements of HTML5 include,,,,,, etc., which are used to build modern web pages. 1. Define the head content, 2. Used to navigate the link, 3. Represent the content of independent articles, 4. Organize the page content, 5. Display the sidebar content, 6. Define the footer, these elements enhance the structure and functionality of the web page.

HTML5 and H5: Understanding the Common UsageHTML5 and H5: Understanding the Common UsageApr 22, 2025 am 12:01 AM

There is no difference between HTML5 and H5, which is the abbreviation of HTML5. 1.HTML5 is the fifth version of HTML, which enhances the multimedia and interactive functions of web pages. 2.H5 is often used to refer to HTML5-based mobile web pages or applications, and is suitable for various mobile devices.

HTML5: The Building Blocks of the Modern Web (H5)HTML5: The Building Blocks of the Modern Web (H5)Apr 21, 2025 am 12:05 AM

HTML5 is the latest version of the Hypertext Markup Language, standardized by W3C. HTML5 introduces new semantic tags, multimedia support and form enhancements, improving web structure, user experience and SEO effects. HTML5 introduces new semantic tags, such as, ,, etc., to make the web page structure clearer and the SEO effect better. HTML5 supports multimedia elements and no third-party plug-ins are required, improving user experience and loading speed. HTML5 enhances form functions and introduces new input types such as, etc., which improves user experience and form verification efficiency.

H5 Code: Writing Clean and Efficient HTML5H5 Code: Writing Clean and Efficient HTML5Apr 20, 2025 am 12:06 AM

How to write clean and efficient HTML5 code? The answer is to avoid common mistakes by semanticizing tags, structured code, performance optimization and avoiding common mistakes. 1. Use semantic tags such as, etc. to improve code readability and SEO effect. 2. Keep the code structured and readable, using appropriate indentation and comments. 3. Optimize performance by reducing unnecessary tags, using CDN and compressing code. 4. Avoid common mistakes, such as the tag not closed, and ensure the validity of the code.

H5: How It Enhances User Experience on the WebH5: How It Enhances User Experience on the WebApr 19, 2025 am 12:08 AM

H5 improves web user experience with multimedia support, offline storage and performance optimization. 1) Multimedia support: H5 and elements simplify development and improve user experience. 2) Offline storage: WebStorage and IndexedDB allow offline use to improve the experience. 3) Performance optimization: WebWorkers and elements optimize performance to reduce bandwidth consumption.

Deconstructing H5 Code: Tags, Elements, and AttributesDeconstructing H5 Code: Tags, Elements, and AttributesApr 18, 2025 am 12:06 AM

HTML5 code consists of tags, elements and attributes: 1. The tag defines the content type and is surrounded by angle brackets, such as. 2. Elements are composed of start tags, contents and end tags, such as contents. 3. Attributes define key-value pairs in the start tag, enhance functions, such as. These are the basic units for building web structure.

Understanding H5 Code: The Fundamentals of HTML5Understanding H5 Code: The Fundamentals of HTML5Apr 17, 2025 am 12:08 AM

HTML5 is a key technology for building modern web pages, providing many new elements and features. 1. HTML5 introduces semantic elements such as, , etc., which enhances web page structure and SEO. 2. Support multimedia elements and embed media without plug-ins. 3. Forms enhance new input types and verification properties, simplifying the verification process. 4. Offer offline and local storage functions to improve web page performance and user experience.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.