.background-svg {
height: calc(100% - 10px);
width: calc(100% - 10px);
position: absolute;
top: 0;
z-index: 9;
background: url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='50%25' y='70%25' font-size='20' fill-opacity='0.2' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45, 100 100)'%3E内部机密文件,请勿外传%3C/text%3E%3C/svg%3E")
repeat;
}
注意z-index大于底层元素一般z-index:2即可。