标签:osi abs har back sla position view rgba rgb
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> body, html { margin: 0; width: 100%; height: 100%; } #box { width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); position: relative; } #content { position: absolute; width: 70%; height: 70%; background: pink; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); } </style> </head> <body> <div id="box"> <div id="content"></div> </div> </body> </html>
标签:osi abs har back sla position view rgba rgb
原文地址:https://www.cnblogs.com/dog2016/p/13168534.html