作者:ColinYinbaohua | 来源:互联网 | 2023-02-01 19:36
我很困惑为什么背景颜色没有出现在这段代码上."1"
类上有填充但即使指定了颜色也没有颜色.在容器类中查找问题.
请帮忙.
body {
margin: 0px;
background-color: #fff;
}
/*
font-family: 'Lato', sans-serif;
font-family: 'Fjalla One', sans-serif;
font-family: 'Gloria Hallelujah', cursive;
*/
.welcome {
font-family: 'Gloria Hallelujah', sans-serif;
font-size: 45;
text-align: center;
color: #000;
}
.sub1 {
font-family: 'Lato', sans-serif;
font-size: 30;
color: #000;
text-indent: 20;
}
.sub2 {
font-family: 'Lato', sans-serif;
font-size: 25;
color: #000;
text-indent: 20;
}
.container {
position: relative;
width: 100%;
height: 600px;
}
/*.container img {
position: absolute;
width: 1800px;
background-size: cover;*/
}
@-webkit-keyframes xfade {
0% {
opacity: 1;
}
33% {
opacity: 1;
}
44% {
opacity: 0;
}
89% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes xfade {
0% {
opacity: 1;
}
33% {
opacity: 1;
}
44% {
opacity: 0;
}
89% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.container p:nth-child(3) {
-webkit-animation: xfade 45s 0s infinite;
animation: xfade 45s 0s infinite;
}
.container p:nth-child(2) {
-webkit-animation: xfade 45s 15s infinite;
animation: xfade 45s 15s infinite;
}
.container p:nth-child(1) {
-webkit-animation: xfade 25s 30s infinite;
animation: xfade 25s 30s infinite;
}
.container {
position: relative;
}
.container img {
position: absolute;
}
.1 {
width: 100%;
height: 100%;
padding: 100px;
/*background-image: url(Pictures/cupcakes.jpg)*/
background-color: #00FFFF;
overflow: auto;
background-size: cover;
}
Welcome to JAM Bakery!
Creamy, Sweet, Toasted
Your Choice.
请检查您可能会看到的任何其他问题.谢谢.
1> amphetamachi..:
"1"不是有效的CSS类.CSS类必须以字母,连字符或下划线开头.
有关详细信息,请参阅此答案或W3C规范文档.