gpt4 book ai didi

javascript - 添加 <script> 元素时 CSS 翻译转换停止工作

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

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="assign0CSS.css">
<title> Songs </title>


</head>
<body>

<div id='headerBar'>

</div>
<div id="everything" >

<div id="loginContainer">
<div id='topPart'>
<h2 id="Welcome"> Welcome <img id="add" src="add.png" alt="login" > </h2>

</div>
<form action="#" method= "POST" id="login" name="login">
<input type="text" id="Username" name="Username" placeholder="Username"> <br />
<input type="password" id="Password" name="Password" placeholder="Password"> <br />
<input type="submit" id="SubmitForm" value="Sign In">
</form>
</div>
</div>

<div id="everything2" >

<div id="notRegistered" >

<div id="topPart2">

<h2 id='Welcome2' >First time? <img id="heart" src="heart.png" alt="heart" > </h2>
</div>

<form action="#" method= "POST" id="register" name="register" onSubmit="return validateForm()">

<input type="text" id="emailAddress" name="emailAddress" placeholder="Email Address" style="margin-top : 2px;" > <br />

<input type="text" id="username2" name="username2" placeholder="Username"> <br />

<input type="password" id="password2" name="password2" placeholder="Password"> <br />

<input type="password" id="password22" name="password22" placeholder="Confirm Password"> <br />

<input type="submit" id="signUp" name="signUp" value="Sign up" > <br />

</form>


</div>
</div>


<div id="rightSide">

<h2 id="SOTW" > Songs of the week </h2>

<img id="pic1" src="allOfMe.jpg" alt="pic1" >
<img id="pic2" src="problem.jpg" alt="pic2" > <br />
<img id="pic3" src="maps.jpg" alt="pic3" >
<img id="pic4" src="stayWithMe.jpg" alt="pic4" > <br />

</div>


</body>
</html>

所以我有这个代码作为我的主页,在我的 CSS 中,我有一些像这样的过渡

#everything, #everything2
{

-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera < 12.1 */
animation: fadein 2s;

-ms-transform: translatey(20px); /* IE 9 */
-webkit-transform: translatey(20px); /* Chrome, Safari, Opera */
transform: translatey(20px);

-webkit-transition: 1s ease-in-out;
-moz-transition: 1s ease-in-out;
-o-transition: 1s ease-in-out;


}

只要我在我的主页上添加一个脚本标签过渡停止工作但淡入继续工作我不知道为什么谢谢!

最佳答案

我遇到了同样的问题。以下解决方案对我有用。改变

<link rel="stylesheet" type="text/css" href="assignOCSS.css" /> 

进入

    <?php 
$random = rand(0,999999);
echo '<link rel="stylesheet" href="assignOCSS.css'.$random.'">';
?>

哦,如果你服务器上的样式表隐藏在 map 的某个地方,那么把它变成这样:

    <?php 
$random = rand(0,999999);
echo '<link rel="stylesheet" href="www.mydomain.com/myfolder/assign0CSS.css'.$random.'">';
?>

我希望这对你也有用!

关于javascript - 添加 &lt;script&gt; 元素时 CSS 翻译转换停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25556807/

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