Want to share your CSS expertise with others? Apply to the MDN Fellowship by April 1! http://mzl.la/MDNFellowship

mozilla
Your Search Results

    min-width

    この文書は翻訳中です。他国語のままの部分などがあるのはその為です。
    是非お気軽に MDN に登録して翻訳に参加し、私たちの手助けをして下さい!

    概要

    min-width は、要素の最小幅を指定する CSS プロパティです。ウィンドウのリサイズや、リサイズ可能要素の閲覧者によるリサイズに伴う要素幅の縮小の下限を決定する事が出来ます。

    • 初期値 0
    • 適用対象 ブロックレベル及び置換要素。<table> については Browser compatibility を参照してください。
    • 継承 継承しない
    • 相対値の基準 包含ブロックの幅
    • メディア visual
    • 計算値 指定した相対値、或いは指定した <length>

    構文

    min-width:  <length> | <percentage> | auto | -moz-max-content | -moz-min-content | -moz-fit-content | -moz-available

    auto
    On a flex item, this keyword indicates a minimum size of the min-content size; on all other items, it resolves to 0.
    <length>
    The fixed minimum width. See <length> for possible units. Negative values make the declaration invalid.
    <percentage>
    The fixed minimum widht expressed as a <割合> of containing block's width. Negative values make the declaration invalid.
    max-content
    The intrinsic preferred width.
    min-content
    The intrinsic minimum width.
    available or fill-available
    The containing block width minus horizontal margin, border and padding. Two experimental specs, CSS3 Box and CSS3 Writing Modes, have a different name for this value. It is yet unclear which name will be selected in fine. Meanwhile, only prefixed versions should be used.
    fit-content
    According CSS3 Box, this is a synonym of min-content. CSS3 Writing Modes defines a more complex algorithm, but no browser implements it, even in an experimental way.

    Mozilla の独自拡張 CSS プロパティ

    -moz-max-content
    The intrinsic preferred width.
    -moz-min-content
    The intrinsic minimum width.
    -moz-available
    The containing block width minus horizontal margin, border and padding.
    -moz-fit-content
    -moz-min-content と同じもの

    table { min-width: 75%; }
    
    form { min-width: 0; }

    仕様

    仕様書 策定状況 コメント
    CSS Writing Modes Module Level 3 草案 Adds the max-content, min-content, fit-content, and fill-available keywords.
    Makes auto compute to min-content.
    It still is unclear which one of the two competing definition, the one of CSS3 Box or the one of CSS3 Writing Modes, will be selected.
    CSS Basic Box Model 草案 Adds the max-content, min-content, fit-content, and available keywords.
    It still is unclear which one of the two competing definition, the one of CSS3 Box or the one of CSS3 Writing Modes, will be selected.
    CSS Flexible Box Layout Module 勧告候補 Adds the auto keyword and uses it as the initial value.
    CSS Transitions 草案 min-width がアニメーション可能として定義された
    CSS Level 2 (Revision 1) 勧告 最初期の定義

    ブラウザ実装状況

    機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    基本サポート 1.0 1.0 (1.0) 7.0 4.0 2.0.2 (416), buggy before
    <table> への適用 [1] no yes no yes no
    max-content, min-content, fit-content, and (fill-)available no [3] 3.0 (1.9) -moz [2] no no no [3]
    auto 21.0 no no no no
    機能 Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    基本サポート ? ? ? ? ?

    注記

    [1] CSS 2.1 explicitely leaves the behavior of min-width with <table> undefined. Therefore any behavior is CSS2.1-compliant; newer CSS specifications may define this behavior, so Web developers shouldn't rely on a specific one now.

    [2] Gecko experimentally implements the definitions given in CSS3 Basic Box. This one defines available and not fill-available. Also the definition of fit-content is simpler than in CSS3 Writing Modes.

    [3] WebKit implements an earlier proposal, the keyword intrinsic.

    関連情報

    ドキュメントのタグと貢献者

    Contributors to this page: ethertank, teoli, Daigo, Mgjbot
    最終更新者: ethertank,
    サイドバーを隠す