pub const offset_x: (&'static str, Option<&'static str>, bool);
Expand description
Moves the content inside of the container horizontally by the specified pixel amount. This attribute only supports pixels.
§Example
fn app() -> Element {
rsx!(
rect {
width: "200",
height: "200",
background: "gray",
offset_x: "20", // Shifts content 20 pixels to the right
rect {
width: "100",
height: "100",
background: "red",
}
}
)
}