Why doesn't it work to use style style in antd rowing pictures?


Why do you write like this? it doesn"t work here. It"s depressing


take a look at the source code of antd. The carousel component is implemented based on react-slick, and there is such a paragraph in the code of react-slick

    React.cloneElement(children[k], {
        key: 100 * i + 10 * j + k,
        tabIndex: -1,
        style: {
            width: `${100 / settings.slidesPerRow}%`,
            display: "inline-block"

so you can see that the style written directly in the outermost layer will be replaced, which can be achieved by adding className and writing style inside

this is the code of antd You can see that react-slick
is the source code of react-slick
ider.js" rel= "nofollow noreferrer" > https://github.com/akiran/rea...