0
私が下で作成した方法でガラスエフェクトを作成し、それを幅と高さが100%の包含divに適用することは可能でしょうか?これは、ウィンドウのサイズをどのように変更しても、常にウィンドウとともに移動することを意味します。ブラウザのウィンドウサイズに基づいてdivをローテートする
<!DOCTYPE html>
<html lang="en">
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
body {
margin: 0;
padding: 0;
background: #eee;
}
#container {
width: 500px;
height: 500px;
position: absolute;
top: 200px;
margin-left: -250px;
left: 50%;
background: #333;
}
#container .glass {
position: absolute;
width: 710px;
height: 710px;
top: -355px;
left: -355px;
background: #fff;
opacity: 0.1;
-webkit-transform:rotate(45deg);
}
</style>
</head>
<body>
<div id="container">
<div class="glass"></div>
</div>
</body>
</html>