is there away to use a different positioning system for elements. where you don't change the width and height of the 开发者_如何学Celement instead you can change it using left,right, top, bottom
more or less like the flex controllers?
Yes you can, I'm not 100% sure if it's fully supported in all browsers but you can use absolute positioning and specify ALL of the coordinates.
i.e.
.pos {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
Which should stretch across the whole window.
You can then modify, or animate each of the properties in jQuery..
i.e.
$(".pos").animate({
bottom: "50%",
right: "50%"
}, 2000);
Cheers,
Marko
精彩评论