我必须编码,需要帮助将它们组合在一起。
HTML代码:
<div class="loader">
<span></span>
<span></span>
<span></span>
</div>
CSS代码:
.loader {
text-align: center;
}
.loader span {
display: inline-block;
vertical-align: middle;
width: 10px;
height: 10px;
margin: 50px auto;
background: black;
border-radius: 50px;
-webkit-animation: loader 0.9s infinite alternate;
-moz-animation: loader 0.9s infinite alternate;
}
.loader span:nth-of-type(2) {
-webkit-animation-delay: 0.3s;
-moz-animation-delay: 0.3s;
}
.loader span:nth-of-type(3) {
-webkit-animation-delay: 0.6s;
-moz-animation-delay: 0.6s;
}
@-webkit-keyframes loader {
0% {
width: 10px;
height: 10px;
opacity: 0.9;
-webkit-transform: translateY(0);
}
100% {
width: 24px;
height: 24px;
opacity: 0.1;
-webkit-transform: translateY(-21px);
}
}
@-moz-keyframes loader {
0% {
width: 10px;
height: 10px;
opacity: 0.9;
-moz-transform: translateY(0);
}
100% {
width: 24px;
height: 24px;
opacity: 0.1;
-moz-transform: translateY(-21px);
}
}
我需要帮助组合,这样我才能制作动画。
您必须使用eclipse吗?你可以使用
<link rel="stylesheet" type="text/css" href="style.css">
在index.html文件中,然后为css创建一个style.css文件。
有3种方法可以设计你的html样式:
-
内联ex:
<p style="color:red;">blah</p>
-
<style></style>
标签之间的html文件的<head></head>
中的内部样式 -
外部在单独的style.css文件中。使用顶部示例附加外部样式表