所以我的代码看起来像这样:
<div id="blackbox">style="background: black;
width: 90px;
height: 80px;
color: white;
text-align: center;
font-family: Times;
font-size: 20px;
position: fixed;
left: 0px;
bottom: 150px
Run Code Online (Sandbox Code Playgroud)
现在它以某种方式在内联CSS中不起作用,这是我能做到的唯一事情.如果你有一个解决方案,我会很高兴.但是,我想制作:hover属性但是如何因为这不起作用:
<div style="background: black;
width: 90px;
height: 80px;
color: white;
text-align: center;
font-family: Times;
font-size: 20px;
position: fixed;
left: 0px;
bottom: 150px}
blackbox:hover {background: white;}
Run Code Online (Sandbox Code Playgroud)
要么
:hover {background: white;}
Run Code Online (Sandbox Code Playgroud)
要么
hover {background: white;}
Run Code Online (Sandbox Code Playgroud) 我的网站上有一个动画,从width: 100px to 800px悬停时开始.
但是当它悬停时,它只会进入正常位置而没有动画.
我怎么能得到它所以动画会像悬停时那样回到悬停状态?
我只找到过渡的解决方案,但我需要它用于动画.
<div id="blackbox"/>
<div id="blacktxt">
Navigation
</div>
Run Code Online (Sandbox Code Playgroud)