スピーチバブル(すでに作成済み)にマウスを乗せたときにテキストを変更し、マウスが戻ったときにテキストを元に戻したい。私は "ようこそ!"スピーチバブルに設定されたテキストを「スクロールダウン」に変更します。他の問題が...それはそれが難しくなりますので、私はspeechbubble +歓迎のCSS変換を設定していることであるホバー、CSS、およびHTMLのテキストを変更
は、ここに私のコードです:
#welcome{
position:absolute;
top:50%;
left:50%;
width:auto;
height:auto;
-webkit-transform: translateX(-50%) translateY(-50%);
-moz-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
#speechbubble {
margin-left:110px;
width: 230px;
height: 80px;
line-height:80px;
text-align:center;
font-size:15px;
letter-spacing:2px;
-moz-box-shadow: 5px 5px 5px #888;
-webkit-box-shadow: 5px 5px 5px #888;
box-shadow: 5px 5px 5px #888;
font-family:{select:Title Font};
background: {color:Welcome background};
color:{color:Welcome text};
position: relative;
font-weight:bold;
}
#speechbubble:before {
content:"";
position: absolute;
right: 100%;
top: 26px;
width: 0;
height: 0;
border-top: 13px solid transparent;
border-right: 18px solid {color:Welcome background};
border-bottom: 13px solid transparent;
}
#welcome:hover #speechbubble{
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
margin-left:120px;
}
#welcome #speechbubble{
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
<div id="welcome">
<div id="speechbubble">Welcome!</div>
私はいくつかのトリックを試してみました2番目のテキストのdivを追加してCSSのホバーを設定するのと同じように動作しませんでした。だれでも助けてくれますか?ありがとう
ありがとう、これはそれをする正しい方法でない場合、最も簡単でした! –
あなたはいつでも歓迎です:) –