【问题标题】:Which height is used for AppBar, Toolbar in Material-UI?Material-UI中的AppBar,Toolbar使用哪个高度?
【发布时间】:2020-02-18 20:27:06
【问题描述】:

我需要确切知道使用了哪个高度:

<AppBar position="static">
  <Toolbar>

因为稍后在另一个组件中我有以下计算。现在我假设它是 64 像素,但在移动设备上它似乎更小。

return (
      <div
        style={{
          display: "flex",
          maxWidth: `calc(calc((100vmin - 64px) * ${this.state.aspectRatio})+200px)`
        }}

https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions

【问题讨论】:

    标签: css material-ui


    【解决方案1】:

    高度列在 mixins 下的 default theme 中:

    【讨论】:

    • 嗨!意味着不同的方位高度是不同的? :) 我猜 48px 是横向的,64px 是纵向的。应用 56px 后你怎么看?
    • 它还取决于设备屏幕尺寸:例如移动设备与桌面设备,因此移动设备可能会获得 48 像素,平板电脑 56 和台式机 64。
    • 我在桌面和手机横向上的体验高度是64px,但在手机纵向上是70px。我在 iPhone 6s 上测试过。
    • 如何获取代码中的当前值?
    猜你喜欢
    • 1970-01-01
    • 2016-02-22
    • 1970-01-01
    • 2018-12-02
    • 1970-01-01
    • 2015-09-26
    • 1970-01-01
    • 2018-10-11
    • 1970-01-01
    相关资源
    最近更新 更多