min-width: 100% and max-width: 100% difference

1.width:100%和width:auto

  width: 100%, setting target 100% of the width of the parent element of the element regardless of the setting value is the number of margin, margin is not included;

  width: auto, the actual size of adaptively setting target width, Margin is worth considering the size of the set of elements, comprising Margin

2.max-width:100%和min-width:100%

  max-width: 100%, if the specified element does not exceed the width of the width of the parent element, the same size, if the width of the parent element will be more than the width of the width of the parent element of shrinkage.

  min-width: 100% to 100% of the minimum width, but recently place with little control uses a tree, the tree requires a horizontal slider control is added, a plug-in also uses vue which also need to add treeselect horizontal slider.

/deep/ .el-tree > .el-tree-node {
  min-width: 100%;
  display: inline-block;
}

 

Guess you like

Origin www.cnblogs.com/wwkissocool/p/11125301.html