CSS Calc Viewport Units Workaround?

前端 未结 4 975
慢半拍i
慢半拍i 2020-12-02 15:22

From what I\'ve seen in other answers, CSS viewport units can\'t be used in calc() statements yet. What I would like to achieve is the following statement:

4条回答
  •  情深已故
    2020-12-02 15:56

    It's working fine.....
    div { height: calc(100vh - 8vw); background: #000; overflow:visible; color: red; }

    Check here this css code right now support All browser without Opera

    just check this

    Live

    see Live preview by jsfiddle

    See Live preview by codepen.io

提交回复
热议问题