Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

inline background versus adding a div #7

Open
jasonmit opened this issue Sep 13, 2014 · 0 comments
Open

inline background versus adding a div #7

jasonmit opened this issue Sep 13, 2014 · 0 comments

Comments

@jasonmit
Copy link

Great stuff, just nit picking on how it could be done without adding additional elements into the DOM.

Hide the targeted img tags and hook up onload callbacks for each of the images, which will be used to grab the height when their finished.

Remove the src and move it onto an inlined styled background. Set the img height to 0 and the margin-bottom to the cached height value from the onload callback. Now begin to emulate the comcast-effect by increasing the height and decreasing the margin-bottom.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant