This time I will share jQuery Plugin and tutorial about Stacked Photo Card Gallery/Slider Using jQuery And CSS/CSS3, hope it will help you in programming stack.
File Size:
3.77 KB
Views Total:
105
Last Update:
10 days ago
Publish Date:
about a month ago
Official Website:
Go to website
License:
MIT
This tutorial shows how to make use of jQuery and CSS animations to create a fancy stacked photo card gallery/slider just like a stack of polaroid pictures.
How to use it:
1. Add images to the slider following the HTML structure as these:
02
<
div
id
=
"maincontent"
>
03
<
div
class
=
"portfolio"
>
04
<
img
src
=
"1.jpg"
alt
=
"Image Alt"
/><
br
/>
05
<
div
class
=
"ombra"
></
div
>
07
<
div
class
=
"portfolio"
>
08
<
img
src
=
"2.jpg"
alt
=
"Image Alt"
/><
br
/>
09
<
div
class
=
"ombra"
></
div
>
11
<
div
class
=
"portfolio"
>
12
<
img
src
=
"3.jpg"
alt
=
"Image Alt"
/><
br
/>
13
<
div
class
=
"ombra"
></
div
>
15
<
div
class
=
"portfolio"
>
16
<
img
src
=
"4.jpg"
alt
=
"Image Alt"
/><
br
/>
17
<
div
class
=
"ombra"
></
div
>
19
<
div
class
=
"portfolio"
>
20
<
img
src
=
"5.jpg"
alt
=
"Image Alt"
/><
br
/>
21
<
div
class
=
"ombra"
></
div
>
2. The main CSS for the slider.
006
margin
:
60px
auto
0
auto
;
011
animation: comein
1.5
s ease-in-out;
022
box-shadow:
-2px
0
3px
rgba(
0
,
0
,
0
,
0.3
);
025
.portfolio:nth-child(
1
) {
029
.portfolio:nth-child(
1
):hover {
031
transform: rotate(
-2
deg);
034
.portfolio:nth-child(
2
) {
038
.portfolio:nth-child(
2
):hover {
040
transform: rotate(
-2
deg);
043
.portfolio:nth-child(
3
) {
047
.portfolio:nth-child(
3
):hover {
049
transform: rotate(
-2
deg);
052
.portfolio:nth-child(
4
) {
056
.portfolio:nth-child(
4
):hover {
058
transform: rotate(
-2
deg);
061
.portfolio:nth-child(
5
) {
065
.portfolio:nth-child(
5
):hover {
067
transform: rotate(
-2
deg);
073
transform: rotate(
0
deg);