背景的添加和透明化

body:before {
    background: url(https://tva1.sinaimg.cn/large/0072Vf1pgy1foxkiqu05cj31hc0u0duy.jpg) center/cover no-repeat;
    content: '';
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.79;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    -webkit-filter: grayscale(40%);
    -moz-filter: grayscale(40%);
    -ms-filter: grayscale(40%);
    -o-filter: grayscale(40%);
    filter: grayscale(40%);
    filter: gray;
}

插入以上代码至页面定制CSS代码【调节背景透明度:(opacity;n)[n取0~1]】

posted @ 2020-03-04 09:02  こんにちは、世界  阅读(144)  评论(0编辑  收藏  举报