<style>
*{margin: 0;padding: 0;}
ul,ol{list-style: none;}
img{display: block;}
.slider{
width: 490px;
height: 170px;
border: 1px solid beige;
margin: 100px auto;
padding: 5px;
position: relative;
overflow: hidden;
}
.inner{
width: 100%;
height: 100%;
position: relative;
}
.slider ul{
width: 1000%;
position: absolute;
top: 0;
left: 0;
}
</head>
<body>
<div class="slider" id="jd">
<div class="inner">
<ul>
<li><img src="image/001.jpg" alt=""/></li>
<li><img src="image/002.jpg" alt=""/></li>
<li><img src="image/003.jpg" alt=""/></li>
<li><img src="image/004.jpg" alt=""/></li>
<li><img src="image/005.jpg" alt=""/></li>
</ul>
</div>
<ol class="current">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ol>
</div>
</body>
</html>哪位大神可以告诉我,为什么去掉的时候 .inner{
width: 100%;
height: 100%;
position: relative;
}padding: 5px;就不起作用了?
2 回答
- 2 回答
- 0 关注
- 1227 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消