1div {
2 width: 80px;
3 height: 80px;
4 background-color: skyblue;
5}
6
7.tourne {
8 transform: rotate(45deg); /* Équivalent à rotateZ(45deg) */
9 background-color: pink;
10}
11
1/* legacy values */
2display: block;
3display: inline;
4display: inline-block;
5display: flex;
6display: inline-flex;
7display: grid;
8display: inline-grid;
9display: flow-root;
10
11/* box generation */
12display: none;
13display: contents;
14
15/* two-value syntax */
16display: block flow;
17display: inline flow;
18display: inline flow-root;
19display: block flex;
20display: inline flex;
21display: block grid;
22display: inline grid;
23display: block flow-root;
24
25/* other values */
26display: table;
27display: table-row; /* all table elements have an equivalent CSS display value */
28display: list-item;
29
30/* Global values */
31display: inherit;
32display: initial;
33display: revert;
34display: unset;
35
1.d_in {
2 display: inline;
3 /* This causes a block-level element to act like an inline element. */
4}
5
6.d_b {
7 display: block;
8 /* This causes an inline element to act like a block-level element. */
9}
10
11.d_in_b {
12 display: inline-block;
13 /* This causes a block-level element to flow like an inline element
14
15 Compared to display: inline, the major difference is that
16 display: inline-block allows to set a width and height on the element.
17 Also, with display: inline-block, the top and bottom margins/paddings
18 are respected, but with display: inline they are not.
19
20 */
21
22
23}
24
25.d_n {
26 display: none;
27 /* This hides an element from the page. */
28}