开发者

What's the best way to create a frame with a fixed interior dimension and fluid exterior dimension?

开发者 https://www.devze.com 2023-04-05 06:01 出处:网络
I plan on creating a layer of absolutely positioned elements that is moved around with jQuery. I need to create a frame, on top of and around this layer, that has a fixed viewport in the center and ed

I plan on creating a layer of absolutely positioned elements that is moved around with jQuery. I need to create a frame, on top of and around this layer, that has a fixed viewport in the center and edges which flow to the e开发者_Go百科dges of the browser viewport, creating a mask that hides portions of the main layer that is moved around underneath.

Currently I am using four divs to create the frame and setting their dimensions onload with a jQuery statement like this:

`$("#viewportLeft,#viewportRight").css("width",($(window).width()-[maskViewportWidth])/2);`

Any better ideas?


Why not just move a div around inside another div?

0

精彩评论

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