HTML页面显示透视效果,html – CSS – 对背景图像的“敲除”/透视效果
我認(rèn)為這里的想法是圖像必須足夠大,以覆蓋網(wǎng)頁或至少父母div ..
然后,您可以將圖像應(yīng)用于容器和’inner’div的背景.
覆蓋可以通過偽元素而不是單獨(dú)的div來實(shí)現(xiàn).
修訂結(jié)構(gòu) –
.bck {
position: relative;
height: 800px;
width: 100%;
background:url(http://webneel.com/wallpaper/sites/default/files/images/08-2013/23-3d-beach-sand-wallpaper.jpg);
background-repeat: no-repeat;
background-position: center center;
}
.bck::before {
content:'';
position: absolute;
height: 100%;
width: 100%;
top: 0;
left:0;
background:url(https://s3.amazonaws.com/f.cl.ly/items/2W0c3z1z2z3w3A2b0j2w/bck.png);
}
.box {
border: 10px solid white;
padding: 80px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: red;
font-size: 30px;
background:url(http://webneel.com/wallpaper/sites/default/files/images/08-2013/23-3d-beach-sand-wallpaper.jpg);
background-position: center center;
}
Text goes here
總結(jié)
以上是生活随笔為你收集整理的HTML页面显示透视效果,html – CSS – 对背景图像的“敲除”/透视效果的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux下分析prn,Linux下ec
- 下一篇: 企业流程管理平台V2.0介绍