x

Open in Github
@twicpics-components
Documentation

ratio property

The ratio property determines the value of the width/height ratio of the image display area.

Its value can be:

  • a ratio expression of the form width/height or width:height like4/3,4:3,800/600...
  • a number that is the result of such an expression like1.85,2, or0.5.
  • "none" as inratio="none". In this case the media displayed has a "free" ratio defined by the dimensions of its container. Particularly useful in the case of image or video hero.

A square area (ratio="1") will be created by default.

ratio="2.39"(mode iscover)
ratio="2.39"(mode iscontain)