Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS3 box-direction property


May 05, 2021 CSS Reference Manual


Table of contents


The child elements of the div box are displayed in the opposite direction:

div
{
width:350px;
height:100px;
border:1px solid black;

/* Firefox */
display:-moz-box;
-moz-box-direction:reverse;

/* Safari、Opera 以及 Chrome */
display:-webkit-box;
-webkit-box-direction:reverse;

/* W3C */
display:box;
box-direction:reverse;
}

Give it a try yourself

Browser support

CSS3 box-direction property CSS3 box-direction property CSS3 box-direction property CSS3 box-direction property CSS3 box-direction property

There is currently no browser that supports the box-direction property.

Firefox supports alternative -moz-box-direction properties.

Safari, Opera, and Chrome support alternative -webkit-box-direction properties.

Definitions and usages

The box-direction property specifies which direction the child elements of the box element are arranged.

Default: normal
Inheritance: no
Version: CSS3
JavaScript syntax: object .style.boxDirection="reverse"

Grammar

box-direction: normal|reverse|inherit;
Value Describe Test
normal The child element is displayed in the default direction. Test
reverse Displays child elements in the opposite direction. Test
inherit The value of the box-direction property should be inherited from the child element