CSS在jsfiddle中工作,但不在本地服务器上工作吗?

时间:2019-08-08 09:20:44

标签: html css jsfiddle

我最近开始了一个项目,只是为我的数字课制作一个临时网站。我已经使用CSS制作了按钮,但由于某种原因,只有其中一个按钮具有样式。我已经正确设置了类,并且按钮甚至在jsfiddle中都可以正常工作,只是不在我的网站上?

当我将它放在jsfiddle中时,它对于两个按钮均正常工作

.button {
  background-color: rgb(0, 255, 8);
  border: none;
  color: white;
  padding: 16px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
}

.button1 {
  width: 110px;
  height: 60px;
  background-color: rgb(146, 255, 119);
  color: black;
  box-shadow: 4px 4px green;
  border-radius: 40%;
  font-family: 'Carter One', cursive;
  font-size: 18px;
  text-align: center;
}
.button1:hover {
  background-color: rgb(123, 255, 0);
  color: black;
  font-family: 'Carter One', cursive;
  border-radius: 40%;
  transform: scale(1.2) rotateZ(-10deg);
}
.button2 {
  width: 110px;
  height: 60px;
  background-color: rgb(146, 255, 119);
  color: black;
  box-shadow: 4px 4px green;
  border-radius: 40%;
  font-family: 'Carter One', cursive;
  font-size: 18px;
  text-align: center;
}
.button2:hover {
  background-color: rgb(123, 255, 0);
  color: black;
  font-family: 'Carter One', cursive;
  border-radius: 40%;
  transform: scale(1.2) rotateZ(10deg);
}
<button class="button button1" style= "position: absolute; left: 28%; top: 207px;">SALES</button>
<button class="button button2" style= "position: absolute; left: 66.5%; top: 207px;">OTHER</button>

两个按钮都应设置样式,但类不能正常工作

0 个答案:

没有答案
相关问题