相当于宽度:-moz-可在Google Chrome中使用

Van*_*nco 10 google-chrome css3

是否有其他方法可以填充Google Chrome中嵌套div的可用空间?Firefox的-moz-available就是这样,但考虑了边距,填充和滚动条.但是,没有-webkit可用.

ilg*_*gam 14

试试这个.

elem {
  width: 100%;
  width: -moz-available;          /* For Mozzila */
  width: -webkit-fill-available;  /* For Chrome */
  width: stretch;                 /* Unprefixed */
}
Run Code Online (Sandbox Code Playgroud)


gre*_*eim 7

那这个呢?

box-sizing: border-box;
Run Code Online (Sandbox Code Playgroud)