CSS3 动画 HTML
<!DOCTYPE HTML><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ball</title> <style type="text/css"> *{ margin: 0;padding: 0; } .imgBox{ -webkit-transform: scale(3); -webkit-animation-name : 'wobble'; -webkit-animation-duration : 1.5s; -webkit-animation-timing-function : ease-in-out; -webkit-animation-delay : 2s; -webkit-animation-iteration-count : 1; -webkit-animation-direction: normal; } @-webkit-keyframes 'wobble'{ from{ -webkit-transform: scale(3.0); } to{ -webkit-transform: scale(1); } } .wrap{ width: 500px;height: 500px;overflow:hidden;margin: 0 auto; } </style></head><body><div class="wrap"> <div class="imgBox"> <img src="/static/imghwm/default1.png" data-src="http://www.mjjq.com/blog/photos/Image/mjjq-photos-900.jpg" class="lazy" alt=""> </div></div><script type="text/javascript"></script></body></html>
初始图片是放大3倍,然后通过-webkit-animation来还原图片的比例,动画执行完毕后,,怎么又回到3倍了.?
要怎么做啊?
回复讨论(解决方案)
<!DOCTYPE HTML><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ball</title> <style type="text/css"> *{ margin: 0;padding: 0; } .imgchange{width: 100px;height: 100px;}/*自己设置大小*/ .imgBox{ -webkit-transform: scale(3); -webkit-animation-name : 'wobble'; -webkit-animation-duration : 1.5s; -webkit-animation-timing-function : ease-in-out; -webkit-animation-delay : 2s; -webkit-animation-iteration-count : 1; -webkit-animation-direction: normal; } @-webkit-keyframes 'wobble'{ from{ -webkit-transform: scale(3.0); } to{ -webkit-transform: scale(1); } } .wrap{ width: 500px;height: 500px;overflow:hidden;margin: 0 auto; } </style></head><body><div class="wrap"> <div class="imgBox"> <img src="/static/imghwm/default1.png" data-src="http://www.mjjq.com/blog/photos/Image/mjjq-photos-900.jpg" class="lazy" alt=""> </div></div><script type="text/javascript"> var tt = document.querySelector(".imgBox"); tt.addEventListener("webkitAnimationEnd", function(){ //动画停止时事务 this.className += 'imgchange'; }, false);</script></body></html>
.imgBox{
-webkit-transform: scale(1);
默认情况下 动画样式处理完毕 则 普通样式发生作用
新的浏览器 css3 动画样式 可以增加一个关键字
定义动画后 用动画样式的最后样式渲染
忘记怎么拼了 你自己搜索下
新的浏览器 css3 动画样式 可以增加一个关键字
定义动画后 用动画样式的最后样式渲染
忘记怎么拼了 你自己搜索下
求具体写法啊,我也觉得应该有这么一个属性,要不然总用js也不是办法啊

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.


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

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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

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.

WebStorm Mac version
Useful JavaScript development tools
