Я создал базовую удерживающую страницу в codepen https://codepen.io/smithandsuch/full/KGarVO/ и добавил некоторые базовые эффекты затухания в анимации, но при загрузке того же кода на мой сайт http://www.smithandsuch.com/ анимация не работает, у меня действительно нетИдея почему, кто-нибудь может помочь?
Я знаю из опыта codepen, который, кажется, довольно прост, с плохо написанным кодом, но я скопировал CSS и не могу найти никаких ошибок.Я также открыл CSS в скобках, чтобы посмотреть, есть ли какие-то ошибки, и я не смог найти их там.
function update() {
$('#clock').html(moment().format('ddd DD MMM YYYY H:mm'));
}
setInterval(update, 1000);
/*-----animation-----*/
.fade-in {
-webkit-animation: fade-in 1s ease-in-out 0.9s both;
-moz-animation: fade-in 1s ease-in-out 0.9s both;
animation: fade-in 1s ease-in-out 0.9s both;
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
* {
padding: 0;
margin: 0;
}
body {
margin: 10px 20px;
background: #f8f8f8f8;
min-width: 375px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "futura-pt";
font-weight: 600;
font-style: normal;
color: #0b1c26;
text-align: left;
opacity: 1;
}
.h1-hero {
max-width:1440px;
font-size: 4.4em;
margin: auto;
padding-bottom: 2em;
opacity: 1;
}
h2 {
font-size: 2.4em;
}
h3 {
font-size: 1.4em;
}
a {
color: #0b1c26;
}
header {
height: 60px;
}
.hero {
height: calc(100vh - 140px);
width: 100vw;
display: flex;
justify-content: center;
/*align-items: center;*/
flex-direction: column;
}
footer {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
}
.red {
color: #FF5733;
}
/*-----media queries-----*/
@media screen and (min-width:375px) and (max-width:768px) {
body {
margin: 10px 10px;
}
.h1-hero {
font-size: 2em;
max-width: 768px;
}
h2 {
font-size: 1.5em;
}
h3 {
font-size: 1.2em;
}
.h3-today {
display: none;
}
body {
overflow: hidden;
}
}
<body>
<header><h2 class="fade-in">&<span class="red">.</span></h2>
</header>
<div class="hero">
<h1 class="h1-hero fade-in">Hi, I'm Andrew a Freelance Web designer and Front-End Developer based in London<span class="red">.</span><br>I design modern intuitive websites with a focus on good UX design<span class="red">.</span></h1>
</div>
<footer>
<h3 class="h3-today fade-in"><span id="clock">Today I'm...</span> | Coding: <a href="http://wink.smithandsuch.com/" target="_blank">wink</a> | Watching: <a href="https://www.youtube.com/watch?v=L6cDDmk-O5A" target="_blank">Maniac</a> | Listening: <a href="https://www.youtube.com/watch?v=aamiinOWLhI" target="_blank">Surfbort - Hippie Vomit Inhaler</a></h3>
<h3 class="fade-in">Contact: <u>andrew@smithandsuch.com</u></h3>
</footer>
</body>