css3のnvidiaページ(http://www.nvidia.com/object/cool_stuff.html)のようなホバー効果を試していましたが、結果はhttp://www.html5.ssl2.pl/です。今、あなたはそれがうまく機能しません見ることができるように - あなたは1つのdivを置くだろうと、他のすべてが移動すると境界線(与えるより多くのスペース)との問題もあるcss3でニースのホバー効果
コード:
<html>
<head>
<style>
body{
background: #eee;
margin:0;
padding:0;
}
div.nowy{
position:absolute;
width:200px;
height:100px;
background:grey;
border: 0px solid #eee;
-moz-transition: border 0.2s, box-shadow 0.2s;
-webkit-transition: border 0.2s, box-shadow 0.2s;
box-shadow: 1px 3px 3px black;
}
div.nowy:hover {
border:5px solid white;
box-shadow: 0px 2px 6px black;
}
</style>
</head>
<body>
<div style="width:800px; height:300px; margin-top:50px; margin-left:50px; position:relative">
<div class="nowy" style="left:100px;"></div>
<div class="nowy" style="left:350px;"></div>
<div class="nowy" style="left:600px;"></div>
</div>
</body>
これを修正する方法はありますか? ありがとうございます。
これは完璧だった。個人的に私は元の方が良いと思っています –
@Amayあなたがこれを認識しているかどうかわかりませんが、これはIEのどのバージョンでもアニメーション化されません... jQueryを使う方が良いでしょう。 –
@MikeyGまたはさらに[vanilla javascript](http://vanilla-js.com/)。うーん... – StefanNch