2

2009 年に導入された新しいフレックス モデルを理解するのに苦労しています。

3 つの市長の構文変更がありましたね。私はこのチュートリアルを読んでいますが、これは最新だと思います。 http://css-tricks.com/using-flexbox/

Chrome では問題ないように見えますが、Firefox では機能しないようです。コンセプトはシンプルです。3 つの記事を含むコンテンツ ボックスがあります。1 つの記事には左側に画像が含まれ、もう 1 つの記事にはメイン コンテンツ (詳細) が中央に配置されて柔軟であり、右側には 1 つの概要ペインがあります。

私が正しく理解していれば、この CSS ファイルは詳細ボックスを展開しながら水平方向に配置する必要があります。Netbeans から、'flex: 1' は不明なプロパティであることがわかりました。私は何を間違っていますか?

#content { /*Eigenlijke tekst/artikels*/
    /* Oude chome, Android, Opera, IOS & safari syntax */
    display: -webkit-box;
    -webkit-box-orient: horizontal;

    /* Oude firefox syntax */
    display: -moz-box;
    -moz-box-orient: horizontal;

    /* Microsoft moet weer speciaal doen (IE) */
    display: -ms-flexbox;
    -ms-flex-orient: horizontal;

    /* Nieuwe chome syntax */
    display: -webkit-flex;
    -webkit-flex-direction: row;

    /* Nieuwste syntax */
    display: flex;
}

article {
    border: 1px solid black;
}
article[id="picture"] {
    width: 150px;
    padding: 10px;
    margin-left: -20px;
}
#content > article[id="details"] {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    margin-left: 10px;
    margin-right: 10px;
    padding: 10px;
}
article[id="overview"] {
    width: 225px;
    padding: 10px;
}

これは HTML 構文です。

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
        <!--<![endif]-->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">
        <link rel="stylesheet" href="css/detailpages.css">
        <jsp:useBean id="al" scope="application" class="beans.actionlisteners" />
        <script src="js/vendor/modernizr-2.6.2.min.js"></script>
    </head>
    <body>
        <div id="page_wrapper">
            <jsp:include page="header.jsp" />
            <jsp:include page="navigation.jsp" />
            <div id="content_wrapper">
                <section id="content">
                    <article id="foto">
                        <img src="img/festivals/rock_werchter_2013.png"
                             alt="Rock Werchter 2013 - afbeelding" width="140px"
                             draggable="true" ondragstart="<% al.dragstart(); %>"
                             />
                        Foto:&nbsp;&nbsp;
                    </article>
                    <article id="details">
                        <header>
                            <h2>Header van details</h2>
                        </header>
                            <p>Gegevens van festival</p>
                        <footer>
                            <h3>footer van details</h3>
                        </footer>
                    </article>
                    <article id="overzicht">
                        <header>
                            <h2>Lijsten</h2>
                        </header>
                            <p>Festivallijst & toevoegen</p>
                        <footer>
                            <h3>borderfactory dinges</h3>
                        </footer>
                    </article>
                </section>
            </div>
            <hr style="width: auto; margin-left: 20px; margin-right: 20px;" />
            <jsp:include page="footer.jsp" />
        </div>
    </body>
</html>
4

1 に答える 1