小编Yes*_*old的帖子

我如何制作:将鼠标悬停在div风格中?

所以我的代码看起来像这样:

<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)

html css hover

4
推荐指数
1
解决办法
2万
查看次数

如何在悬停时使CSS动画反转?

我的网站上有一个动画,从width: 100px to 800px悬停时开始.

但是当它悬停时,它只会进入正常位置而没有动画.

我怎么能得到它所以动画会像悬停时那样回到悬停状态?

我只找到过渡的解决方案,但我需要它用于动画.

<div id="blackbox"/>
<div id="blacktxt">
Navigation
</div>
Run Code Online (Sandbox Code Playgroud)

看这里

html css animation css3

2
推荐指数
1
解决办法
2938
查看次数

标签 统计

css ×2

html ×2

animation ×1

css3 ×1

hover ×1