我希望当我悬停 [.area] 类时,[.button] 类会发生变化,但它不起作用。我能做些什么?
这是我的代码
#content { float:left; margin:0 20px 20px 0; }
.area { z-index:0; position:relative; border-radius:5px; border:3px #09B2D2 solid; height:430px; width:245px; transition: all .5s; }
.area:hover { background:#09b2d2; }
.area:hover .words { color:#fff; }
.head { background:#09b2d2; width:245px; margin-top:25px; text-align:center; font-family:Segoe UI; font-size:30px; text-transform:uppercase; padding:3px 0; font-weight:bold; color:#fff; }
.words { margin-top:25px; line-height:40px; text-align:center; color:#09b2d2; font-family:Segoe UI; font-weight:bold; transition: all .5s; }
.button { z-index:1; transition: all .5s; left:57px; background:#fff; top:-20px; border-radius:3px; border:2px solid #09B2D2; width: 125px; height: 40px; position:relative; text-align:center; }
.button:hover { background:#09b2d2; }
.button:hover .h1 { opacity:0; }
.button:hover .h2 { opacity:100; }
.h1 { transition: all .5s; z-index:2; margin:4px 0 0 -32px; font-weight:bold; color:#09B2D2; font-family:Segoe UI; font-size:20px; position:absolute; }
.h2 { margin:5px 0 0 -36px; transition: all .5s; z-index:2; opacity:0; font-weight:bold; color:#fff; font-family:Segoe UI; font-size:20px; position:absolute; }
.h2 > a { color:#fff; text-decoration:none;}
<div id="content">
<div class="area">
<div class="head">Başlangıç</div>
<div class="words">Wordpress Teknolojisi</br>1 Yıl Alan Adı Tescili</br>500 MB Hosting</br></br>Seo Desteği</br>Ücretsiz Destek</br>Kontrol Paneli</div>
</div>
<div class="button">
<span class="h1">100 TL</span>
<span class="h2"><a href="#">Satın Al</a></span>
</div>
</div>