📜  用 calc 响应 jsx 样式 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:04.046000             🧑  作者: Mango

代码示例1
If you need some more specific CSS you need to put it into quotes - react inline styles doc

In your exact case customFormat = 'hello-div' divStyle = {width: 'calc(100% - 276px)'} return (
Hello World
) In case you need to overwrite multiple widths (fallbacks) for browser compatibility divStyle = {width: 'calc(100% - 276px)', fallbacks: [ { width: '-moz-calc(100% - 276px)' }, { width: '-webkit-calc(100% - 276px)' }, { width: '-o-calc(100% - 276px)' } ]}