本文内容:页面镂空遮罩层、页面镂空遮罩引导层、图片镂空遮罩
常规遮罩层
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <title>Title</title> <style> .mask{ position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: rgba(0,0,0,0.4); display: flex; justify-content: center; align-items: center; z-index: 3; } .mask{ position:fixed; top : 0; left : 0; bottom : 0; right : 0; background:rgba(0,0,0,.5); /*background:hsla(0,100%,80%,0.5)*/ /*background:#000; opacity:0.5; */ } //模糊效果 毛玻璃效果 .blur{ -webkit-filter: blur(5px); /* Chrome, Opera */ -moz-filter: blur(5px); -ms-filter: blur(5px); filter: blur(5px); } </style> </head> <style> </style> <body> <div class='mask'></div> </body> </html>
镂空遮罩层效果如图
使用box-shadow实现镂空遮罩引导层效果
优点:
- 圆角轻松实现;
- box-shadow 不会影响元素位置,定位只需要根据 content 的位置写。
缺点:阴影可视区域无法触发click事件,因此,当点击蒙层任意区域,无法隐藏。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <title>Title</title> <style> .guide{ position: absolute; z-index: 2; top: 0px; left: 50%; transform: translateX(-50%); width: 50px; height: 50px; border-radius: 50px; border: 3px solid #2353FA; box-shadow: 0px 0px 0px 1000px rgba(0,0,0,.75); box-sizing: border-box; } </style> </head> <style> </style> <body> <div class='guide'></div> </body> </html>
使用border实现镂空遮罩引导层效果
缺点:代码量大
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <title>Title</title> <style> .guide{ position: absolute; z-index: 2; .opacityEle{ border: 700px solid rgba(0,0,0,0.75); width: 50px; height: 50px; position: relative; top: -700px; left: -538px; border-radius: 50%; .ele{ width: 50px; height: 50px; border: 3px solid #0B6EFF; border-radius: 25px; box-sizing: border-box; } } } </style> </head> <style> </style> <body> <div class='guide'> <div class='opacityEle'> <div class='ele'></div> </div> </div> </body> </html>
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年09月21日
2024年09月21日
- 群星.2009-原班情歌2CD【SONY】【WAV+CUE】
- 群星.2024-长乐曲电视剧原声带【TME影音】【FLAC分轨】
- 群星.1993-烧得厉害VOL.1好戏好歌唱不停【滚石】【WAV+CUE】
- 魔兽世界wlk阿奴巴拉克怎么打 wlk阿奴巴拉克机制与打法
- 归龙潮阿律的笛子位置在哪 阿律的笛子图文位置一览
- 归龙潮中浦城区福鼠位置在哪 中浦城区福鼠收集位置大全
- NewViennaOctetViennaWindSoloists-TheDeccaRecordings(2024)18CD[24-48][FLAC]-9
- MatteoPasqualini-JohannSebastianBachItalienischesKonzertFranzsischeOuvertureVierDue
- 【雨果唱片】陈百强《梦里人LPCD45》2012[WAV+CUE]
- 《黑神话》纪录片9月20日上线!揭秘关卡为何删减
- 游戏科学估值已和育碧市值相当:后者有两万多名员工
- 黑神话第81周目Boss伤害有多恐怖?起手伤害直接秒
- 群星.2009-原班情歌2CD【SONY】【WAV+CUE】
- 群星.2024-长乐曲电视剧原声带【TME影音】【FLAC分轨】
- 群星.1993-烧得厉害VOL.1好戏好歌唱不停【滚石】【WAV+CUE】