2017-11-28 5 views
0

私はflexでコンテナを持ついくつかのコードを持っており、CSSのプロパティと値としてjustify-content: right;を持っています。これにより、子要素がfirefoxのコンテナの右側に移動します。 CSSトリックまたはW3schoolこの値は無効ですか、存在しません。正しい値はjustify-content: flex-end;です。 Firefoxからのこの質問が表示された場合は、テキストが右揃えになっていることに注意する必要があります。次に、なぜ、justify-content: right;が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>

答えて

3

this pageでブラウザの互換性を参照してください。 Firefoxは現在、leftrightをサポートする唯一のブラウザです。 flex-endを貼る方が良いので、すべてのブラウザで使用できます。

+0

リンクが機能しない – LGSon

+0

リンクを更新しました – TryingToImprove

+0

oop!申し訳ありません試合は – k88lawrence

関連する問題