4.6.7 • Published 4 years ago

browser-mjml-hero v4.6.7

Weekly downloads
63
License
MIT
Repository
github
Last release
4 years ago

mj-hero

Fixed height

<mjml>
  <mj-body>
    <mj-hero
      mode="fixed-height"
      height="469px"
      background-width="600px"
      background-height="469px"
      background-url="https://cloud.githubusercontent.com/assets/1830348/15354890/1442159a-1cf0-11e6-92b1-b861dadf1750.jpg"
      background-color="#2a3448"
      padding="100px 0px">
      <mj-text
        padding="20px"
        color="#ffffff"
        font-family="Helvetica"
        align="center"
        font-size="45px"
        line-height="45px"
        font-weight="900">
        GO TO SPACE
      </mj-text>
      <mj-button href="https://mjml.io/" align="center">
        ORDER YOUR TICKET NOW
      </mj-button>
    </mj-hero>
  </mj-body>
</mjml>

Fluid height

<mjml>
  <mj-body>
    <mj-hero
      mode="fluid-height"
      background-width="600px"
      background-height="469px"
      background-url="https://cloud.githubusercontent.com/assets/1830348/15354890/1442159a-1cf0-11e6-92b1-b861dadf1750.jpg"
      background-color="#2a3448"
      padding="100px 0px"
      width="100%">
      <mj-text
        padding="20px"
        color="#ffffff"
        font-family="Helvetica"
        align="center"
        font-size="45px"
        line-height="45px"
        font-weight="900">
        GO TO SPACE
      </mj-text>
      <mj-button href="https://mjml.io/" align="center">
        ORDER YOUR TICKET NOW
      </mj-button>
    </mj-hero>
  </mj-body>
</mjml>
attributeunitdescriptiondefault value
background-colorcolorhero background color#ffffff
background-heightpxheight of the image used (mandatory in fixed-height mode)none
background-positiontop/center/bottom left/center/rightbackground image positioncenter center
background-urlurlabsolute background urln/a
background-widthpxwidth of the image usedparent element width
css-classstringclass name, added to the root HTML element createdn/a
heightpxhero section height (required for fixed-height mode)0px
modefluid-height/fixed-heightchoose if the height is fixed based on the height attribute or fluidfluid-height
paddingpxsupports up to 4 parameters0px
padding-bottompxbottom offset0px
padding-leftpxleft offset0px
padding-rightpxright offset0px
padding-toppxtop offset0px
vertical-aligntop/middle/bottomcontent vertical alignmenttop
widthpxhero container widthparent element width
4.6.7

4 years ago

4.6.6

4 years ago

4.6.3

4 years ago

4.2.8

5 years ago

4.2.7

5 years ago

4.2.6

5 years ago

4.2.5

5 years ago

4.2.4

5 years ago

4.2.3

5 years ago

4.2.2

5 years ago

4.2.1

5 years ago