html 浏览器标题特效,HTML5/CSS3页面标题的像素溶解特效

CSS

语言:

CSSSCSS

确定

@import url("https://fonts.googleapis.com/css?family=Kumar+One|Roboto:100");

* {

box-sizing: border-box;

}

html,

body {

margin: 0;

padding: 0;

width: 100%;

}

header {

position: relative;

min-height: 60%;

min-height: 60vh;

background-color: inherit;

width: 100%;

padding: 20vh 10vw;

margin: 0;

text-rendering: optimizeLegibility;

text-align: center;

}

section {

margin: 0;

padding: 3vw 24vw;

min-height: 100%;

min-height: 100vh;

width: 100%;

}

.intro {

background-color: blue;

}

.page-title {

width: 88%;

position: absolute;

top: 50%;

left: 50%;

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

}

h1 {

font-family: 'Kumar One', serif;

font-size: 9vw;

text-align: center;

font-weight: 300;

line-height: 0.9;

color: white;

letter-spacing: -0.05em;

}

h1:after {

content: '';

display: block;

position: absolute;

left: 0;

bottom: 0;

height: 160%;

width: 100%;

background-color: blue;

-webkit-mask: url(/uploads/161201/mask.png);

mask: url(/uploads/161201/mask.png);

-webkit-mask-position: bottom;

mask-position: bottom;

-webkit-mask-size: contain;

mask-size: contain;

-webkit-mask-repeat: repeat-x;

mask-repeat: repeat-x;

image-rendering: optimizeSpeed;

image-rendering: -moz-crisp-edges;

image-rendering: -o-crisp-edges;

image-rendering: -webkit-optimize-contrast;

image-rendering: optimize-contrast;

-ms-interpolation-mode: nearest-neighbor;

}

h2 {

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

font-weight: 100;

color: white;

font-size: 3vw;

text-align: center;

margin: 1.3em 0;

padding: 0;

z-index: 100;

}

h2:after {

content: '';

display: block;

width: 7vw;

height: 4px;

border-bottom: 1px solid white;

margin: 20px auto 0 auto;

}

p {

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

font-weight: 100;

color: white;

font-size: 2vw;

line-height: 1.3;

margin-bottom: 2em;

}

a {

color: white;

text-decoration: none;

border-bottom: 1px dashed rgba(255, 255, 255, 0.7);

}

a:hover {

border-bottom: 1px solid white;

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值