Skip to content

Instantly share code, notes, and snippets.

@lnazarit
Created April 12, 2016 19:11
Show Gist options
  • Select an option

  • Save lnazarit/4082d5394c879c7074e2a3eebb787907 to your computer and use it in GitHub Desktop.

Select an option

Save lnazarit/4082d5394c879c7074e2a3eebb787907 to your computer and use it in GitHub Desktop.
.box-default-3 a {
display: block;
position: relative;
color: #FFF;
overflow: hidden;
}
.box-default-3 a h3 {
position: absolute;
bottom: 0;
left: 0;
color: #000;
background: rgba(255,255,255,.8);
font-size: 24px;
font-weight: 300;
padding: 18px 28px;
padding-right: 50px;
margin: 0;
width: 90%;
}
.box-default-3 a h3:after {
color: #f6303e;
content: "+";
position: absolute;
right: 12px;
top: 10%;
font-weight: 200;
font-size: 40px;
}
.box-default-3 a h4 {
font-weight: 600;
font-size: 18px;
margin: 0;
}
.box-default-3 img {
display: block;
-webkit-transition: all .25s ease; -moz-transition: all .25s ease; -o-transition: all .25s ease; -ms-transition: all .25s ease;
}
.box-default-3 a:hover .caption {
opacity: 1;
}
.box-default-3 .caption {
opacity: 0;
padding: 20px;
text-align: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,.7);
-webkit-transition: all .25s ease; -moz-transition: all .25s ease; -o-transition: all .25s ease; -ms-transition: all .25s ease;
}
.box-default-3 a:hover img {
transform: scale(1.2);
}
.box-default-3 .caption .v-align {
position: absolute;
left: 0;
right: 0;
padding: 20px;
}
.v-align {
top: 50%;
transform: translateY(-50%);
}
@media (max-width: 979px){
.box-default-3 a h3 {
font-size: 18px;
padding: 15px 20px;
}
}
@media (max-width: 768px){
.box-default-3 {
margin-left: 0;
}
.box-default-3 li {
float: none;
width: 100%;
margin: 0;
}
.box-default-3 h3 {
margin: 0;
margin-bottom: 7px;
font-size: 18px;
}
.box-default-3 a {
overflow: hidden;
position: relative;
text-align: left;
width: 100%;
padding: 10px;
padding-right: 40px;
border-bottom: 1px solid #EEE;
height: auto;
}
.box-default-3 img {
float: left;
width: 80px;
margin-right: 20px;
}
.box-default-3 a:after {
font-family: FontAwesome;
position: absolute;
right: 10px;
top: 35%;
content: "\f105";
color: #CCC;
font-size: 30px;
}
.box-default-3 p {
line-height: 1.2;
font-size: 13px;
}
.box-default-3 a h3:after {
display: none;
}
.box-default-3 a h3 {
margin: 0;
width: auto;
margin-bottom: 7px;
font-size: 18px;
font-weight: 400;
position: static;
padding: 0;
background: none;
color: #000;
}
.box-default-3 .caption {
overflow: hidden;
opacity: 1;
position: static;
color: #000;
text-align: left;
padding: 0;
background: none;
}
.box-default-3 a h4 {
font-weight: 400;
font-size: 13px;
color: #666;
}
.box-default-3 .caption .v-align {
transform: none;
position: static;
top: 0;
padding: 0;
}
.middle-cover a {
height: auto;
}
.middle-cover a img {
margin-top: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment