老师,我的代码怎么什么也不显示呢
来源:2-2 轮播图样式(2)
流下了没有技术的眼泪
2020-03-26 19:09:02
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="main">
<!-- 图片轮播 -->
<div class="banner">
<a href="">
<div class="banner-slide slide1"></div>
</a>
<a href="">
<div class="banner-slide slide2"></div>
</a>
<a href="">
<div class="banner-slide slide3"></div>
</a>
</div>
</div>
</body>
</html>
index.css
*{
margin: 0;
}
ul{
list-style: none;
}
body{
font-size: "微软雅黑";
color: #11419e;
margin: 300px auto;
}
.main{
width: 1200px;
height: 460px;
margin: 300px auto;
}
.banner{
width: 1200px;
height: 460px;
}
.banner-silder{
width: 1200xp
height460px;
background-repeat: no-repeat;
}
.slide1{
background-image: url("img/bg1.jpg");
}
.slide2{
background-image: url("img/bg2.jpg");
}
.slide3{
background-image: url("img/bg3.jpg");
}1回答
你好,css代码有误,
.banner-silder{
width: 1200xp
height460px;
background-repeat: no-repeat;
}改为:
.banner-silder{
width: 1200px;
height:460px;
background-repeat: no-repeat;
}如果解决您的问题请采纳,祝学习愉快!
相似问题