vue.js實現(xiàn)遮罩層的方法:【div.popContainer {position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0, 0, 0, 0.3);}】。
本文操作環(huán)境:windows10系統(tǒng)、vue.js 2.9、thinkpad t480電腦。
vue實現(xiàn)簡單的遮罩層效果:
具體代碼如下所示:
<div class='popContainer'></div> div.popContainer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.3); }
推薦學(xué)習(xí):php培訓(xùn)