Warning: Undefined array key 0 in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 406

Warning: Attempt to read property "parent" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 407

Warning: Attempt to read property "term_id" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 413

Warning: Attempt to read property "cat_name" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 413

ブロックレベル要素とインライン要素


Warning: Undefined variable $pre in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 517

Warning: Undefined variable $pre in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 517

Warning: Undefined variable $pre in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 517

Warning: Undefined variable $pre in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 517
CSS

HTML5ではブロックレベル要素とインライン要素という分類は廃止になりました。 しかしCSSでのdisplayプロパティの状態としては残っています。
つまり文書構造としての役割はなくなりましたが、装飾としての役割は残っている訳です。

各要素にはdisplayプロパティの初期値が設定されており、CSSのdisplayプロパティで変更が可能です。
代表的なのはblockとinlineですが、他にもblock-inlineやtableなどの値もあります。

isplay:block; /*ブロック*/
display:inline; /*インライン*/

これらの違いについて確認しておきましょう。

ブロックレベル要素

ブロックレベル要素は一つのブロックとして扱われ、縦に並ぶのが特徴です。

isplay:block;

特徴

代表的な要素

p要素、h1要素、div要素など

インライン要素

インライン要素はブロックレベル要素に内包される要素で、横に並ぶのが特徴です。

isplay:inline;

特徴

代表的な要素

a要素、span要素、br要素など

インラインブロック要素

displayの値でよく使うのが、blockとinlineの混合型であるinline-blockです。
高さを指定できるinline要素といった体で、グローバルメニューなどによく使われます。

isplay:inline-block;

特徴


Warning: Undefined variable $category in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 79

Warning: Attempt to read property "name" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 79

の記事

eyecatch

改行・空白・タブ

eyecatch

ウェブサイトに使われる一般的な文字フォント一覧

eyecatch

記事テンプレートを作成するプラグイン「TinyMCE Templates」

eyecatch

最低限知っておくべきSEO

eyecatch

レスポンシブウェブデザインの設定方法

eyecatch

JavaScriptの記述作法


Warning: Undefined variable $category in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 84

Warning: Attempt to read property "count" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 84
HOME