search

Home  >  Q&A  >  body text

div也是块级元素,能来个例子看下么?

div也是块级元素,能来个例子看下么?

橱窗的光橱窗的光2927 days ago2846

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-10-01 00:19:12

    div is also a block-level element. Can you give me an example? -PHP Chinese website Q&A-div is also a block-level element. Can you give me an example? -PHP Chinese website Q&A

    Let’s take a look and learn.

    reply
    0
  • 迷茫

    迷茫2017-02-15 09:19:22

    我们来写一个div标签,然后写点样式,首先我们要知道,每个块级元素都从新的一行开始,并且其后的元素也另起一行

    <div class="dv1"></div>

    <div class="dv2"></div>

    我们设置这俩个div的宽高和一个边框线就能明白了,是在俩行展示

    .dv1{width:200px;height:200px;border:1px solid red;}

    .dv2{width:200px;height:200px;border:1px solid green;}

    reply
    2
  • Cancelreply