70 lines
991 B
CSS
70 lines
991 B
CSS
body {
|
|
padding: 10px;
|
|
}
|
|
|
|
.carousel {
|
|
position: relative;
|
|
width: 398px;
|
|
padding: 10px 40px;
|
|
border: 1px solid #CCC;
|
|
border-radius: 15px;
|
|
background: #eee;
|
|
}
|
|
|
|
.carousel img {
|
|
width: 130px;
|
|
height: 130px;
|
|
/* make it block to remove space around images */
|
|
display: block;
|
|
}
|
|
|
|
.arrow {
|
|
position: absolute;
|
|
top: 60px;
|
|
padding: 0;
|
|
background: #ddd;
|
|
border-radius: 15px;
|
|
border: 1px solid gray;
|
|
font-size: 24px;
|
|
line-height: 24px;
|
|
color: #444;
|
|
display: block;
|
|
}
|
|
|
|
.arrow:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.arrow:hover {
|
|
background: #ccc;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.prev {
|
|
left: 7px;
|
|
}
|
|
|
|
.next {
|
|
right: 7px;
|
|
}
|
|
|
|
.gallery {
|
|
width: 390px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.gallery ul {
|
|
height: 130px;
|
|
width: 9999px;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
transition: margin-left 250ms;
|
|
/* remove white-space between inline-block'ed li */
|
|
/* http://davidwalsh.name/remove-whitespace-inline-block */
|
|
font-size: 0;
|
|
}
|
|
|
|
.gallery li {
|
|
display: inline-block;
|
|
}
|