gpt4 book ai didi

css悬停不执行

转载 作者:太空宇宙 更新时间:2023-11-03 20:48:16 25 4
gpt4 key购买 nike

我希望将鼠标悬停在图像上时,图像的尺寸会稍微变大。我知道这很简单,但我已经在其他示例中寻找了一个小时,但似乎无法弄清楚我遗漏了什么。感谢您的帮助。这些图片保存在我的电脑上。

适用范围

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<embed src="73797^alarmclock.mp3"; autostart="true"; loop="true"; hidden="true";/>

<body>

<img src ="alarm clock2.jpg"/>

<p> Pulling the sheets into my body, I begin to sink back into the bed...
uggh... my alarm clock... time to get up..

<img style = "position:absolute; top:300px; right: 0px; z-index:1"
src="computer.jpg"/>

<IMG ID="grow" STYLE= "position:absolute; TOP:1157px; LEFT:599px;
WIDTH:47px; z-index:2; HEIGHT:47px" SRC="icon2.gif"/>

</body>

</html>

这是 stylesheet.css

#grow:hover {
width: 100px;
height: 150px;
}

最佳答案

我认为内联样式优先于 CSS。

将您的 CSS 和 HTML 更改为以下内容:

#grow {
position:absolute;
top:1157px;
left:599px;
width:47px;
z-index:2;
height:47px
}
#grow:hover {
width: 100px;
height: 150px;
}

HTML:

<IMG  ID="grow" SRC="icon2.gif"/> 

关于css悬停不执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18518055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com