模仿阿里巴巴的面试题

这道题对高手来说是小菜一碟了

我是低手

在网上看到了阿里巴巴曾经的面试题,初看之下不会做,当然现在会了。我还是不用浮动

鼠标放上之前是这样子:

放上之后会放大,这个样子:

面试题要求用js实现放大的效果,我是用了css3

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>阿里巴巴面试题</title>
<style>

body{ margin:0; padding:0}  
div{background:#CCCCCC; position:absolute}  
#first{width:100px; height:150px}  
#second{top:160px;width:100px;height:150px}  
#third{ width:200px; height:310px; left:110px} 
#forth{width:210px;height:150px;left:320px;}
#fifth{width:100px;height:150px;left:320px;top:160px;}
#sixth{width:100px;height:150px;left:430px;top:160px;}


div:hover{-webkit-transform:scale(1.25,1.25);
transform:scale(1.25,1.25);
-moz-transform:scale(1.25,1.25);

background:red;}
</style>
</head>

<body>
<div id="first">1</div>     
<div id="second">2</div>     
<div id="third">3</div> 
<div id="forth">4</div> 
<div id="fifth">5</div> 
<div id="sixth">6</div> 
</body>
</html>
写在这里,以后自己看

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值