Use Animate.css animation
//Introduce external CSS resources through @import;
//Introduce online images and JS files;
// Generate different types of CSS3 animations by changing the CSS class name;
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 </head> 6 <style> 7 /* Animate.css GitHub地址:https://github.com/daneden/animate.css */ 8 /* Animate.css 演示地址:https://daneden.github.io/animate.css/ */ 9 10 @import url("http://cdn.gbtags.com/animate.css/3.1.1/animate.min.css");11 body {12 background: #cfcfcf;13 }14 img {15 position: absolute;16 left: 50%;17 top:50%;18 margin-left: -100px;19 margin-top: -100px;20 width:200px;21 height:200px;22 }23 24 </style>25 <body>26 <img src="/static/imghwm/default1.png" data-src="http://www.gbtags.com/gb/networks/uploadimg/074627f0-0a62-4176-aa85-06a4364deeab.png" class="lazy" alt="">27 </body>28 <script src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>29 <script>30 function rock (x) { // 定义事件函数;31 $('img').not('.center')32 .addClass(x + ' animated') // 添加CSS类名;33 .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'34 ,function(){35 $(this).removeClass();36 });37 };38 39 $(document).ready(function(){40 rock("rubberBand infinite"); // 添加CSS类名生成相应的动态效果;41 setTimeout(function(){window.lcation.href = "http://www.kiklink.com"},6000);42 // 设置时间跳转;43 });44 </script>45 </html>
Second custom Animate.css animation
// You can use the animate.css code as a basis to write custom animation effects;
1 @keyframes bounce { /*通过@keyframes规则,创建bounce动画;*/ 2 0%,20%,50%,80%,100% { 3 transform:translateY(0); 4 } 5 40% { 6 transform:translateY(-30px); 7 } 8 60% { 9 transform:translateY(-15px);10 }11 }12 .bounce {13 animation-name:bounce; /*调用bounce动画;*/14 }15 .animated {16 animation-duration:3s; /*一个动画周期的时长;*/17 animation-fill-mode:both; /*指定动画执行之前之后的样式;*/18 }19 .animated.infinite {20 animation-iteration-count:infinite; /*定义动画播放的次数;(n次/infinite无限次);*/21 }
1 <img class="animated bounce infinite lazy" src="/static/imghwm/default1.png" data-src="http://www.gbtags.com/gb/laitu/150x150" alt="">
3 Using JavaScript to control animations
1 $('img').click(function(){ // 给Img元素绑定点击事件;2 var $this = $(this); // 鼠标点击之后添加相应的动画类名; 3 $this.addClass('animated bounce').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend',function(){4 //<strong> 当-webkit-animation动画结束之后会有一个webkitAnimationEnd事件;</strong>5 //<strong> 当one()方法监听到webkitAnimationEnd事件之后才执行function函数;one()方法只能执行一次;</strong>6 $this.removeClass(); // 清除相应的动画类名;7 })8 });

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version