Changing Iframe Width/Height in Javascript Based on Anchor Point
Ok, I deal with this all the time in flash but I'm kind of lost in how to accomplish this in Javascript and CSS. I have an iframe (which by definition doesn't have an overflow property) whose width/height i'm trying to modify. Is there an eas开发者_Python百科y way to change this value relative to a certain anchor point? Basically I have an ad that has a contracted and expanded state. If the expanded state expands leftward or upward, how can i modify the width/height in such a way to display the entire contents of the ad?
You can absolutely position your ad and anchor it with bottom
and right
:
.ad {
position: absolute;
bottom: 0;
right: 0;
}
Then when you increase the height and width, it will expand upwards and leftwards.
精彩评论