-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCard_title.html
180 lines (159 loc) · 4.06 KB
/
Card_title.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body
{
background-color:#f2f2f2;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
-webkit-font-smoothing: antialiased;
}
*
{
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
h5
{
margin:0px;
font-size:1.4em;
font-weight:700;
}
p
{
font-size:12px;
}
.center
{
height:100vh;
width:100%;
display: flex;
justify-content: center;
align-items: center;
}
/* End Non-Essential */
.property-card
{
height:18em;
width:14em;
display:-webkit-box;
display:-ms-flexbox;
display:flex;
-webkit-box-orient:vertical;
-webkit-box-direction:normal;
-ms-flex-direction:column;
flex-direction:column;
position:relative;
-webkit-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
-o-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
border-radius:16px;
overflow:hidden;
-webkit-box-shadow: 15px 15px 27px #e1e1e3, -15px -15px 27px #ffffff;
box-shadow: 15px 15px 27px #e1e1e3, -15px -15px 27px #ffffff;
}
/* ^-- The margin bottom is necessary for the drop shadow otherwise it gets clipped in certain cases. */
/* Top Half of card, image. */
.property-image
{
height:6em;
width:14em;
padding:1em 2em;
position:Absolute;
top:0px;
-webkit-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
-o-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
background-image:url('https://cdn.photographylife.com/wp-content/uploads/2017/01/What-is-landscape-photography.jpg');
background-size:cover;
background-repeat:no-repeat;
}
/* Bottom Card Section */
.property-description
{
background-color: #FAFAFC;
height:12em;
width:14em;
position:absolute;
bottom:0em;
-webkit-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
-o-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
padding: 0.5em 1em;
text-align:center;
}
/* Social Icons */
.property-social-icons
{
width:1em;
height:1em;
background-color:black;
position:absolute;
bottom:1em;
left:1em;
-webkit-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
-o-transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}
/* Property Cards Hover States */
.property-card:hover .property-description
{
height:0em;
padding:0px 1em;
}
.property-card:hover .property-image
{
height:18em;
}
.property-card:hover .property-social-icons
{
background-color:white;
}
.property-card:hover .property-social-icons:hover
{
background-color:blue;
cursor:pointer;
}
/* Optional
.property-image-title
{
text-align:center;
position:Relative;
top:30%;
opacity:0;
transition:all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1) 0.2s;
color:black;
font-size:1.2em;
}
.property-card:hover .property-image-title
{
opacity:1;
}
*/
</style>
</head>
<body>
<div class="center">
<div class="property-card">
<a href="#">
<div class="property-image">
<div class="property-image-title">
<!-- Optional <h5>Card Title</h5> If you want it, turn on the CSS also. -->
</div>
</div></a>
<div class="property-description">
<h5> Card Title </h5>
<p>Lorem Ipsum Dipsum hortata. Mixcall Horcho. Mixwell Chingo. More Bingo. Lorem Ipum doth be hard.</p>
</div>
<a href="#">
<div class="property-social-icons">
<!-- I would usually put multipe divs inside here set to flex. Some people might use Ul li. Multiple Solutions -->
</div>
</a>
</div>
</div>
</body>
</html>