Тень на весь экран
Люди как можно грамотно сделать тень на весь экран и чтобы по центру можно-бы было поставить какой-нибудь блок?
и чтобы оно было по центру когда окно двигалось вверх или вниз?? немогу понять как это сделать, каждый раз криво выходит |
<!DOCTYPE html> <html> <head> <title>...</title> <style type="text/css"> html, body { margin: 0; padding: 0; height: 100%; background-image: url('http://sites.google.com/site/jaimemontoya/Sample07.jpg'); } .shadow { position: fixed; width: 100%; height: 100%; background-color: #000; opacity: 0.7; } .center_block { position: fixed; left: 50%; top: 50%; margin: -100px 0 0 -100px; width: 200px; height: 200px; background-color: #f00; } </style> </head> <body> <div class="shadow"></div> <div class="center_block"></div> </body> </html> |
Часовой пояс GMT +3, время: 14:39. |