开发者

Hybrid absolute / fixed positioning behavior with CSS or Javascript?

开发者 https://www.devze.com 2023-04-04 10:05 出处:网络
I need to position a div in the bottom left corner of a container that has a real height of 100% of the browser window. The container has movement. Is it possible with css or even jQuery to get a chil

I need to position a div in the bottom left corner of a container that has a real height of 100% of the browser window. The container has movement. Is it possible with css or even jQuery to get a child div positioned in the bottom left hand corner of a container?

That is something a hybrid behavior like this:

<div id="container"&开发者_JAVA技巧gt;
   <span class="blc">i'm here!</span>
</div>

.blc{
   position:fixed; bottom:0px;
   position:absolute; left:0px; 
}

I've provided an example on JSFiddle. http://jsfiddle.net/DeRwm/

Hybrid absolute / fixed positioning behavior with CSS or Javascript?

Thank you!!!


Just add following css:

#container{
 position:relative;
}

.blc{
   position:absolute;
   left:0px; 
   bottom:0px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消