html图片悬浮时变大,CSS3 图片悬停时放大、渐变模糊和字体间距变大

CSS

语言:

CSSSCSS

确定

@import url("http://fonts.googleapis.com/css?family=Roboto:300,400");

a {

text-decoration: none;

color: #fff;

}

.eat {

background-image: url("http://static6.therichestimages.com/cdn/864/585/90/cw/wp-content/uploads/3188.jpg");

}

.drink {

background-image: url("http://static6.therichestimages.com/cdn/864/585/90/cw/wp-content/uploads/3188.jpg");

}

.play {

background-image: url("http://static6.therichestimages.com/cdn/864/585/90/cw/wp-content/uploads/3188.jpg");

}

.relax {

background-image: url("http://static6.therichestimages.com/cdn/864/585/90/cw/wp-content/uploads/3188.jpg");

}

ul {

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

text-align: center;

letter-spacing: 0.1em;

}

ul li {

float: left;

width: 50%;

height: 200px;

overflow: hidden;

}

ul li a {

position: relative;

display: block;

height: 100%;

width: 100%;

background-repeat: no-repeat;

background-position: center center;

/* box-shadow inset 0 0 0 1px #000 */

background-size: 100% auto;

-webkit-transition: all 1s ease-in-out;

transition: all 1s ease-in-out;

}

ul li a:hover {

letter-spacing: 0.2em;

text-shadow: 0 0 10px #000;

background-size: 120% auto;

background-color: rgba(255, 127, 80, 0.5);

z-index: 999;

}

ul li a span {

text-transform: uppercase;

position: absolute;

text-align: center;

top: 50%;

left: 50%;

-webkit-transform: translate(-50%, -50%);

-ms-transform: translate(-50%, -50%);

transform: translate(-50%, -50%);

z-index: 10;

}

ul li a span h1 {

font-size: 2em;

font-weight: 400;

}

ul li a span p {

font-weight: 300;

}

ul li a .tint {

position: absolute;

width: 100%;

height: 100%;

z-index: 0;

background: rgba(100, 149, 237, 0.5);

-webkit-transition: all 0.5s ease-in-out;

transition: all 0.5s ease-in-out;

}

ul li a .tint:hover {

background: rgba(0, 128, 128, 0.5);

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值