You are here: Reference > CSS > properties > browser specific extensions > -moz-background-inline-policy

-moz-background-inline-policy property

Browser support:
Specifies how the background-image of an inline element is determined when the contents of the inline element wrap onto multiple lines.
JavaScript page for this property: MozBackgroundInlinePolicy. You can find other example(s) there.

Possible values:

 One of the following values: 
bounding-box
The background-image is shown behind the entire element as a whole.
continuous
The background-image wraps around on to each line as if the text had no line breaks.
each-box
The background-image is shown behind each box as a whole in the current element.
inherit
Takes the value of this property from the computed style of the parent element.
Default: continuous.

Example HTML code 1:

This example illustrates the use of the -moz-background-inline-policy property:
<head>
    <style>
        .example {
            background: url("rainbow.gif");
            -moz-background-inline-policy: continuous;
            border: solid 2px black;
        }
    </style>
</head>
<body>
    <span class="example"> <strong>This element should have a rainbow
    background which follows it around, however much it wraps, so that
    it starts on red on the first line and gradually goes through
    yellow, orange, green, blue, indigo, and violet. If the inline is
    longer than the background, the background should start over. If
    each line starts again at red, then the test has failed.</strong>
    Filler text. Filler text. Filler text. Filler text. Filler text.
    Filler text. Filler text. Filler text. Filler text. Filler text.
    Filler text. Filler text. Filler text. Filler text.
    </span>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content