CSS current window size
I am trying some thing like making the background of the whole body part.
<html>
<head><head/>
<body>
<div class="wrapper"></div>
</body>
</html>
in this case ho开发者_运维百科w do i get the height and width of the current body cause i show a popup other than that i want to blur the whole background.
If you want your wrapper to go full window height and width, you will need to add a few attributes to your html
and body
elements.
Try something like this:
html {
height: 100%;
}
body {
min-height: 100%;
}
.wrapper {
background: rgba(0,0,0,0.50);
height: 100%;
width: 100%;
}
Have you tried
.wrapper {
height: 100%;
width: 100%;
color: black;
-moz-opacity: .2;
filter: alpha(opacity=20);
z-index: 1;
}
or something similar?
精彩评论