我正在創建一個投資組合,我希望它能夠讓有人在我的名字周圍盤旋時出現一個帶箭頭的泡泡。我已經完成了這部分,但問題是-webkit-transition
屬性不起作用。這個泡泡與我的名字有點相似,所以我想要它,所以需要一點時間才能再次隱藏,所以有人可以很容易地去找它,因爲我正在考慮讓表單與我聯繫。-webkit-transition:屬性在bubble元素中不起作用?
我的HTML:
<div id="side-bar"><h1 id="ab_me">About Me</h1>
<img src="saksham.png" id="saksham">
<p id="name"><span>S</span>aksham <span>C</span>hauhan</p>
<div id="bubble">
SUP !
<div id="bubble-arrow-border">
</div>
<div id="bubble-arrow">
</div>
</div>
</div>
我的CSS:
div#side-bar p
{
font-size:25;
border-bottom:2px solid red;
position:absolute;
left:10px;
color:#F63737;
}
div#side-bar p:hover
{
border-bottom:2px groove #C01F1F;
color:#C01F1F;
text-shadow:0px 1px 2px #F98378;
-webkit-transition:1s;
}
div#side-bar p span
{
font-size:40px;
}
div#side-bar p:hover ~ #bubble
{
display:block;
visibility:visible;
opacity:1;
-webkit-transition:5s;
}
div#side-bar p #bubble:hover
{
display:block;
visibility:visible;
opacity:1;
}
#bubble
{
background-color:#EDEDED;
visibility:hidden;
border:2px solid #666666;
font-size:35px;
line-height:1.3em;
padding:10px;
position:absolute;
text-align:center;
width:300px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
-moz-box-shadow:0 0 5px #888888;
-webkit-box-shadow:0 0 5px #888888;
z-index:100;
left:230px;
top:400px;
display:none;
-webkit-transition:5s;
opacity:0;
}
#bubble-arrow
{
border-color:transparent #EDEDED transparent transparent;
border-style: solid;
border-width: 15px;
height:0;
width:0;
position:absolute;
bottom:25px;
left:-28px;
z-index:100;
}
#bubble-arrow-border
{
border-color:transparent #666666 transparent transparent;
border-style: solid;
border-width: 15px;
height:0;
width:0;
position:absolute;
bottom:25px;
left:-31px;
}
沒有工作兄弟,但thanx! – 2013-03-03 04:53:47
我認爲這是可選的,因爲'property'和'timing-function'的'transition'屬性的初始值是'all'和'ease' https://developer.mozilla.org/zh-CN/docs/CSS/transition – xpy 2013-03-03 09:35:09