html图片悬浮加字特效,CSS3 图片悬停时显示说明文字页面的效果

CSS

语言:

CSSSCSS

确定

@import url(https://fonts.googleapis.com/css?family=Slabo+27px);

@import url(https://fonts.googleapis.com/css?family=Lato);

.snip1523 {

font-family: 'Lato', sans-serif;

position: relative;

float: left;

overflow: hidden;

margin: 10px 1%;

min-width: 230px;

max-width: 315px;

width: 100%;

color: #ffffff;

text-align: left;

font-size: 16px;

background-color: #1A1A1A;

}

.snip1523 * {

-webkit-box-sizing: border-box;

box-sizing: border-box;

-webkit-transition: all 0.45s ease;

transition: all 0.45s ease;

}

.snip1523 img {

vertical-align: top;

max-width: 100%;

backface-visibility: hidden;

}

.snip1523 figcaption {

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

z-index: 1;

padding: 30px;

background-color: #202123;

-webkit-transform: translateX(100%);

transform: translateX(100%);

-webkit-box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);

box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);

}

.snip1523 h2,

.snip1523 h3,

.snip1523 p {

margin: 0;

}

.snip1523 h2,

.snip1523 h3 {

font-family: 'Slabo 27px', serif;

line-height: 1.2em;

}

.snip1523 h2 {

font-size: 1.9em;

color: #35ADF9;

}

.snip1523 h3 {

color: #EBEBEB;

font-size: 1.3em;

font-weight: normal;

letter-spacing: 1px;

}

.snip1523 p {

border-top: 1px solid rgba(255, 255, 255, 0.2);

font-size: 0.9em;

margin-top: 12px;

padding: 12px 0 15px;

line-height: 1.5em;

}

.snip1523 a {

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

z-index: 1;

}

.snip1523:hover > img,

.snip1523.hover > img {

-webkit-transform: translateX(100%);

transform: translateX(100%);

}

.snip1523:hover figcaption,

.snip1523.hover figcaption {

-webkit-transform: translateX(0%);

transform: translateX(0%);

}

/* Demo purposes only */

body {

background-color: #212121;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值