我有一個過渡效果,可以在幻燈片上向下/向上滑動。當然這很有道理,但我希望它能像邊框一樣慢慢地淡入/淡出。CSS3 - 過渡效果幻燈片背景位置
這裏是我的代碼:
body {
background-color: rgb(6, 7, 11);
}
.bar-logout {
float: left;
background: rgb(7, 8, 13);
width: auto;
height: 40px;
border-bottom: 1px solid rgb(112, 101, 58);
cursor: pointer;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
.bar-logout span {
float: right;
padding: 6px 10px 6px 10px;
}
.bar-logout span span.logout {
font-family: "Trebuchet MS", Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
color: rgb(164, 157, 139);
padding-top: 9px;
text-shadow: 0px 2px 3px rgb(0, 0, 0);
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
.bar-logout span span.logout .logout-icon {
float: left;position:relative;bottom:2px;background-image:url('http://i.imgur.com/eCXybOC.png');background-repeat:no-repeat;background-position:0 -16px;margin:0 8px 0 0;width:16px;height:16px;-webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out; }
.bar-logout: hover {
border-bottom: 1px solid rgb(200, 180, 85);
}
.bar-logout:hover > span span.logout .logout-icon {
background-position: 0 0;
}
<div class="bar-logout">
<span>
<span class="logout"><div class="logout-icon"></div>LOGOUT</span>
</span>
</div>
STA zelis達postignes? –
你只喜歡淡入淡出,並沒有滑動?.. – repzero
馬爾科Mackic PA卵子IKONA ZA註銷だね拉迪幻燈片ネ考淡出/中,這一領域的空白BAS花王ovaj邊框底部.. @repzero是的,這樣的底部邊框。 –