1
, 내가 JS에 대해 거의 아무것도 몰라이 페이지는 사이트가로드되기 전에 나타납니다, 지클로 사전로드 페이지를 만들려면 어떻게해야합니까? 좋아
body{
display: flex;
justify-content: center;
align-items: center;
height: 870px;
background-color:#000;
position: relative
}
p{
font-weight: bold;
font-size: 30px;
color:#00ff00;
display: inline
}
div{
display: flex;
justify-content: center;
align-items: center;
width:400px;
height:400px
}
div > span{
background-color:transparent;
height:190px;
width:190px;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border:20px solid transparent;
border-bottom:20px solid red;
border-top:20px solid red;
animation: rotateleft 1.25s infinite ease-in-out;
position: absolute;
}
div > span ~ span {
background-color:transparent;
width:150px;
height:150px;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border:20px solid transparent;
border-left:20px solid red;
border-right:20px solid red;
animation: rotateright 1.25s infinite ease-in-out;
position: absolute;
}
section{
position: absolute;
width:;
overflow: hidden;
animation: words 2.5s infinite ease-in-out
}
@keyframes words{
from {
width:0
}
to{
width:130px
}
}
@keyframes rotateleft{
from{
transform: rotate(0)
}
to{
transform: rotate(-360deg)
}
}
@keyframes rotateright{
from{
transform: rotate(0)
}
to{
transform: rotate(360deg)
}
}
<section><p>Loading...</p></section>
<div>
<span></span>
<span></span>
</div>
나는 내 웹 사이트에이를 사용하고자하는 codepen
에이 프리로드 페이지 스타일을 발견했다. 지킬로 어떻게 할 수 있니? 인덱스 이전에 이것을 호출해야한다고 말할 수있는 곳입니까? JS 함수가 필요하거나이 예제만으로도이를 수행 할 수 있습니다 (html 및 css 만 사용). jQuery로
안녕, 크리스 :
다음은이 작업을하는 방법을 보여주는 코드 조각입니다! 이 함수는 어디에 두어야합니까? 내 말은, 어떤 파일 안에 있니? – U23r
어떻게 작동하는지 보여줄 스 니펫을 추가했습니다. html 파일과'.js' 파일에 jquery를 포함시켜야합니다. 이 파일에'fadeOut' 함수를 넣으십시오. – chrisz