Middle
Tell us about your experience with the second-level caching mechanism in projects.
sobes.tech AI
Answer from AI
CSS property display determines how an element is displayed on the page. Main values:
block— the element takes up the full width of the container, starts on a new line. Example:<div>,<p>.inline— the element takes only the necessary width, does not start on a new line. Example:<span>,<a>.inline-block— combines properties of inline and block: the element is placed inline, but width and height can be set.
Flexbox
Flexbox is a layout model for simplifying the arrangement of elements within a container, especially for responsive interfaces.
How it works:
- A container with
display: flexbecomes a flex container. - Its child elements are flex items, arranged along the main axis (by default — horizontally).
Main container properties:
flex-direction— direction of the main axis (row,column,row-reverse,column-reverse).justify-content— alignment of items along the main axis (flex-start,center,space-between, etc.).align-items— alignment along the cross axis (flex-start,center,stretch, etc.).flex-wrap— wrapping items onto a new line (nowrap,wrap,wrap-reverse).
Main item properties:
flex-grow— how much the item can grow.flex-shrink— how much the item can shrink.flex-basis— the base size of the item.
Example:
.container {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.item {
flex-grow: 1;
flex-basis: 100px;
}
This allows for easy creation of flexible and responsive layouts without using float or positioning.