hexo-theme-butterfly/source/css/_layout/relatedposts.styl
Jerry 51c4726c54 improvements: 代碼名全大寫
improvements: 補全card-categories和card-archives的 '查看更多‘鏈接 close #337
fix: 修復comments沒設置時,報Unexpected token ')'的bugs close #344
improvements: 優化js和html
fix: 修復toc 滾動百分比不準的Bugs
2020-08-31 01:31:59 +08:00

55 lines
1014 B
Stylus

.relatedPosts
margin-top: 1rem
& > .headline
margin-bottom: 5px
font-weight: 700
font-size: 1.43em
& > .relatedPosts-list
& > div
position: relative
display: inline-block
overflow: hidden
margin: 3px
width: calc(33.333% - 6px)
height: 200px
background: $dark-black
vertical-align: bottom
&:hover
.cover
opacity: .8
transform: scale(1.1)
+maxWidth768()
margin: 2px
width: calc(50% - 4px)
height: 150px
+maxWidth600()
width: calc(100% - 4px)
.cover
width: 100%
height: 100%
opacity: .4
transition: all .6s
object-fit: cover
.content
position: absolute
top: 50%
padding: 0 1rem
width: 100%
transform: translate(0, -50%)
.date
color: var(--light-grey)
font-size: 90%
.title
@extend .limit-more-line
color: var(--white)
-webkit-line-clamp: 2