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

inline background versus adding a div #7

@jasonmit

Description

@jasonmit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions