An adaptive and easy-to-use CSS


Mainly using CSS


The following code shows

<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
      width: 100px;
      display: flex;
      justify-content: space-between;
      padding: 2px 8px;
      border: 1px solid #ccc;
      background-color: aqua;
      overflow: hidden;
      color: #fff;
      width: 100%;
      max-width: min-content;
      max-width: min-content;
      /*Overflow is displayed with an ellipsis*/
      text-overflow: ellipsis;
      overflow: hidden;
      /*Overflow does not wrap*/
      white-space: nowrap;
    <div class="box">
      <div class="boxMain">
        < div class = "L" > CSS adaptive style max width: Min content < / div >
        <div class="r">>>></div>

By changing the width of the. Box, you can see that the interior changes as the width increases or decreases

An adaptive and easy-to-use CSS