gpt4 book ai didi

html - :hover and animation with html/css 的问题

转载 作者:行者123 更新时间:2023-11-28 06:28:23 25 4
gpt4 key购买 nike

我正在制作我的个人网站,但我遇到了一个问题:当您将鼠标悬停在名称上时,它应该向右滚动并且应该会出现在它下面的文字,但是“嗨,我是”继续存在。 .. 任何提示/帮助? jsfiddle.net/qm3cvb58

#name {
position:relative;
top:100px;
left:50px;
font-family: Impact, Charcoal, sans-serif;
font-weight: lighter;
color:#ffffff;
font-size:40px;
cursor:pointer;


transition-property: width, opacity, margin-left, border-width;
transition-duration: 2s;

-webkit-transition-property: width, opacity, margin-left, border-width;
-webkit-transition-duration: 2s;

-o-transition-property: width, opacity, margin-left, border-width;
-o-transition-duration: 2s;

-moz-transition-property: width, opacity, margin-left, border-width;
-moz-transition-duration: 2s;
}
p:hover{

margin-left: 130px;


}
#presentation {
position:relative;
top:15px;
left:50px;
font-family: Arial, Helvetica, sans-serif;
font-weight: lighter;
color:#ffffff;
font-size:40px;
cursor:pointer;
overflow: hidden;




}
html{
cursor:url(http://www.severdhed.com/images/arcade/cursors/gifs/invader1.gif),auto;

background: url(http://sf.co.ua/13/07/wallpaper-2951792.jpg) no-repeat center center fixed;

-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
overflow-x: hidden;

}

#some-div:hover #some-element {
display: block;
}
<!DOCTYPE html>
<html>
<head>
<title>Shawn Pinciara</title>
<style type="text/css">
@import url("style.css");
</style>
</head>
<body>

<p id="name">NAME SURNAME</p>
<a id="presentation">HI, I'M</a>


</body>
</html>

最佳答案

你可以试试 this也许:

#presentation {
opacity: 0;
-webkit-transition:all 0.5s;
transition:all 0.5s;
}
#name:hover + #presentation {
-webkit-transition-delay: 1s;
transition-delay: 1s;
opacity: 1;
}

关于html - :hover and animation with html/css 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35136740/

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