0

I'm trying to implement the Zooming out/in(browser) only on visible area of website exactly like site http://halfcreative.themes.bitfade.com/. When you zoom out or in, only visible area zooms in or out. I googled for it but didn't find the answer. Any idea how to do this?

Alex Polly
  • 76
  • 1
  • 2
  • 9

2 Answers2

1

You mean this effect? Check DEMO http://jsfiddle.net/bJnCV/

HTML

<div id="home">
    <h1>Site Name</h1>
    <p>This is slogan</p>
</div>

JQUERY

$(document).ready(function(){
    $('#home').css({'width':$(window).width(),'height':$(window).height()});    
});
$(window).resize(function() {
    $('#home').css({'width':$(window).width(),'height':$(window).height()});
});
yeyene
  • 7,297
  • 1
  • 21
  • 29
0

Take a look at the CSS of the site. (min-)height: 100%; is a keyword.

header {
  width: 100%;
  height: 100%;
  text-align: center;
  color: #FFF;
  position: absolute;
  background: rgba(0, 0, 0, 0) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-attachment: fixed;
  min-width: 100%;
  min-height: 100%;
}
Andri
  • 553
  • 4
  • 20