简体   繁体   English

使用CSS和JavaScript的动画

[英]Animation using CSS and JavaScript

https://order.dominos.com/en/ https://order.dominos.com/en/

I recently started learning animation using CSS. 我最近开始使用CSS学习动画。 Its quite easier than and light weight than JS and flash but I know there are limitations with CSS animation. 它比JS和Flash轻而易举,但我知道CSS动画存在局限性。

In the link above, I was just wondering if the effect on hovering over the "Order Now" div is achieved only through CSS or there's JS involved. 在上面的链接中,我只是想知道是否仅通过CSS或涉及JS才能实现将鼠标悬停在“立即订购” div上的效果。 I have been trying to single out the code from the page source responsible for the effect, but I've had luck only with the CSS. 我一直在尝试从页面源代码中挑选出负责效果的代码,但是我只靠CSS运气。 I cannot see any JS that alters the style of the div. 我看不到任何可更改div样式的JS。 Maybe I'm wrong. 也许我错了。

Any help? 有什么帮助吗?

If you use Firefox as a browser install Firebug . 如果您使用Firefox作为浏览器,请安装Firebug It's easy then to lookup any CSS code used in a site. 然后很容易查找站点中使用的所有CSS代码。 In site you linked link is changed using :hover in css Normal link: 在站点中,您使用css中的:hover更改了链接链接普通链接:

span a {
border-radius: 7px 7px 0 0;
color: #0078AE;
display: block;
font-family: DominosFont,Arial,Helvetica,sans-serif;
padding: 10px 20px;
text-decoration: none;
}

Hover: 徘徊:

#genericHeader .mainNavigation span a:hover {
background: none repeat scroll 0 0 #FFFFFF;
color: #F9022D;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM