div也是块级元素,能来个例子看下么?
2 answers
我们来写一个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;}
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.
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20416
7
13576
4






