Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 811 Bytes

srcset.md

File metadata and controls

42 lines (33 loc) · 811 Bytes

HAPEL Method Parameters


$srcset

(string), (optional), Default: null

Provides the data to build a scrset.

Value Use
string adds the value of 'string' as the attribute
    $srcset = array(
        array(
            'media'     => 'Image_Width',
            'srcset'    => 'Path_To_Image'
        )
    );

Examples:

    $srcset = array(
        array(
            'media' => '650px',
            'srcset' => 'large.jpg'
        ),
        array(
            'media' => '350px',
            'srcset' => 'small.jpg'
        )
    );
<source media="(min-width: 650px)" srcset="large.jpg">
<source media="(min-width: 350px)" srcset="small.jpg">