css简单练习2
设置图片切换效果,如某宝首页下图。
按钮可以先使用div做成正方形,其中加入“>”和“<”
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
* {
margin: 0px;
padding: 0px;
}
#box {
width: 1040px;
height: 560px;
background-image: url(img/TB183NQapLM8KJjSZFBSutJHVXa.jpg);
background-repeat: no-repeat;
background-size: 1040px;560px;
}
.c1,.c2{
opacity: 0.45;
width: 40px;
height: 40px;
font-size: 35px;
position: relative;
top: 250px;
}
.c1 {
float: left;
}
.c2 {
float: right;
}
</style>
</head>
<body>
<div id="box">
<div >
<input type="text" class="c1" value="<"/>
</div>
<div >
<input type="text" class="c2" value=">"/>
</div>
</div>
</body>
</html>