优酷弹图《透明度》
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 <style type="text/css"> 7 div{ 8 width: 300px; 9 height: 300px; 10 } 11 .box{ 12 margin: 100px auto; 13 position: relative; 14 } 15 .content{ 16 position: absolute; 17 background-color: blue; 18 left: -6px; 19 top: -6px; 20 z-index: 2; 21 } 22 .mark{ 23 position: absolute; 24 background-color: black; 25 right: -6px; 26 bottom: -6px; 27 z-index: 1;《定位级》 28 opacity: 0.5; 29 } 30 </style> 31 </head> 32 <body> 33 <div class="box"> 34 <div class="content"></div> 35 <div class="mark"></div> 36 </div> 37 </body> 38 </html>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步