From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/block-size/index.html | 107 +++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 files/ja/web/css/block-size/index.html (limited to 'files/ja/web/css/block-size') diff --git a/files/ja/web/css/block-size/index.html b/files/ja/web/css/block-size/index.html new file mode 100644 index 0000000000..9e4f423851 --- /dev/null +++ b/files/ja/web/css/block-size/index.html @@ -0,0 +1,107 @@ +--- +title: block-size +slug: Web/CSS/block-size +tags: + - CSS + - CSS Logical Property + - CSS Property + - Experimental + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/block-size +--- +
{{CSSRef}}
+ +

block-sizeCSS のプロパティで、書字方向に応じた要素ブロックの水平または垂直方向の寸法を定義します。これは {{cssxref("width")}} または {{cssxref("height")}} プロパティに相当し、 {{cssxref("writing-mode")}} の値によって変わります。

+ +

書字方向が垂直方向であった場合、 block-size の値は要素の幅に対応し、水平方向であった場合は要素の高さに対応します。関連プロパティの {{cssxref("inline-size")}} が要素のもう一方の寸法を定義します。

+ +
{{EmbedInteractiveExample("pages/css/block-size.html")}}
+ + + +

構文

+ +
/* <length> 値 */
+block-size: 300px;
+block-size: 25em;
+
+/* <percentage> 値 */
+block-size: 75%;
+
+/* キーワード値 */
+block-size: max-content;
+block-size: min-content;
+block-size: fit-content(20em);
+block-size: auto;
+
+/* グローバル値 */
+block-size: inherit;
+block-size: initial;
+block-size: unset;
+
+ +

+ +

block-size プロパティは、{{cssxref("width")}} や {{cssxref("height")}} プロパティと同じ値を取ります。

+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

縦書き時のブロック方向の寸法

+ +

HTML

+ +
<p class="exampleText">Example text</p>
+
+ +

CSS

+ +
.exampleText {
+  writing-mode: vertical-rl;
+  background-color: yellow;
+  block-size: 200px;
+}
+ +

Result

+ +

{{EmbedLiveSample("Block_size_with_vertical_text")}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Logical Properties", "#logical-dimension-properties", "block-size")}}{{Spec2("CSS Logical Properties")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.block-size")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf