*左右への配置と回り込みの設定 [#v0f29a04] ブロックや画像を左右に配置して文字などの回りこみをを設定するには、 ''float''プロパティを設定します。 <pre> #pre(novervatim){{ COLOR(red):float: COLOR(blue):配置する位置 </pre> floatプロパティは、 画像や指定した要素を、 左右に配置して、その反対側に後に続く要素を回りこませます。 配置する位置には、次のような設定ができます。 -left: 左に配置(後の要素は右に回りこみ) -right: 右に配置(後の要素は左に回りこみ) -none: 左右への配置と回り込みをしない 回り込みを解除するには、 clearプロパティを使います。 <pre> #pre(novervatim){{ div.right { border: thin gray dotted; margin: 0.5em; width: 30%; background: #eeeeee; COLOR(red):float: COLOR(blue):right; } img.left { margin: 0.8em; COLOR(red):float: COLOR(blue):left; clear: right; } </pre> #ref(Lecture/InfoDesignB2004/9th/float/css01.png,nolink,floatの例); &br; &navi2(Lecture/InfoDesignB2005/8th,next);進んでください。 ---- #navi2(Lecture/InfoDesignB2005/8th,prev,toc,next) }} |