国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Ich wei? nicht, warum mein Code-Float nicht funktioniert
lilove
lilove 2018-03-26 14:50:58
0
3
1720

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>3. Zweispaltiges Layout rechts fest links adaptiv< ; /title>

<style type="text/css">

.main {

height:600px;

background-color:skyblue;

margin-right:200px;

}

. right {

width:200px;

height:600px;

background-color:lightgreen;

float:right; /*Legen Sie den rechten Float des Blockelements fest*/

}

</style>

</head>

<body>

<div>body</div>

<div>right</div>

</body>

</html> ;


lilove
lilove

一個混跡在二次元邊際的程序員

Antworte allen(3)
 

同意二樓觀點(diǎn)??

你使用margin-right:200px;

是想給右邊div留位置出來吧?

但是div默認(rèn)寬度100%?

所以你設(shè)置margin-right:200px;之后的div寬度其實(shí)還是100%

因?yàn)閜adding,margin,width,border 加起來才是組件的真實(shí)寬度或高度

lilove432

請將

<div>主體</div>

<div>右側(cè)</div>

改為

<div class="main">主體</div>

<div class="right">右側(cè)</div>

再測試代碼~

lilove432

我去怎么吞代碼了,class沒了

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage