为什么证明内容:只适用于Firefox?

时间:2017-11-28 17:00:22

标签: html css css3 flexbox

所以,我有一些代码用容器作为flex,并且justify-content: right;作为CSS中的属性和值,这使得子元素只在firefox中转到容器的右侧,它'很奇怪,因为从CSS-tricks或W3school这样的引用中,这个值无效或者它不存在,正确的值是justify-content: flex-end;。如果你从firefox看到这个问题,你必须注意到文本右对齐。那么,为什么justify-content: right;在Firefox中有效?或者它只是一个错误?



<!DOCTYPE html>
<html>

<head>
  <title>test</title>
  <style>
    section {
      display: flex;
      justify-content: right;
    }
    
    .text {
      width: 50%;
    }
  </style>
</head>

<body>
  <section>
    <div class="text">To change the way a picture fits in your document, click it and a button for layout options appears next to it. When you work on a table, click where you want to add a row or a column, and then click the plus sign. Reading is easier, too, in the new
      Reading view.</div>
  </section>
</body>

</html>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:8)

请参阅this page处的浏览器兼容性。 Firefox是目前唯一支持使用rightflex-end的浏览器。最好坚持使用BufferedReader reader = new BufferedReader(new InputStreamReader( this.getClass().getResourceAsStream("files/jsonFile.json"))); ,以便它适用于所有浏览器。