Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*** オーソドックスなカード型デザイン ***/
.page-archive .archive-entries {
display: flex;
flex-wrap: wrap;
}
.page-archive .archive-entries .archive-entry {
display: flex;
flex-direction: column;
box-sizing: border-box;
width: 100%;
height: auto;
padding: 0 0 5px;
margin-bottom: 1.5em;
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
border-radius: 0;
transition: .25s ease-in-out;
}
.page-archive .archive-entries .archive-entry:hover {
transform: translateY(-4px);
box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}
@media (min-width: 481px) {
.page-archive .archive-entries .archive-entry {
width: calc(50% - 10px);
}
.page-archive .archive-entries .archive-entry:nth-child(odd) {
margin-right: 20px
}
}
.archive-entry-header {
display: flex;
flex-direction: column-reverse;
order: 2;
padding: 10px 16px 0;
width: calc(100% - 32px);
}
.page-archive .archive-entries .entry-title {
line-height: 1.5;
font-size: 18px;
margin: 0;
padding: 0;
font-weight: bold;
}
.page-archive .entry-title a {
font-size: 18px;
}
.page-archive .archive-entries .entry-thumb-link {
position: relative;
padding-top: 56.25%;
overflow: hidden;
width: 100%;
height: auto;
}
.page-archive .entry-thumb {
background-size: cover;
background-position: 50%;
border-radius: 0;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
}
.page-archive .archive-entries .categories {
order: 3;
margin: 0;
padding: 0 16px;
}
.page-archive .entry-thumb::before {
content: "";
display: block;
width: 100%;
height: 100%;
background: rgba(0,0,0,.1);
opacity: 0;
transition: .25s ease-in-out;
}
.page-archive .archive-entries .archive-entry:hover .entry-thumb::before {
opacity: 1;
}
.archive-entry-body {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment