綜合知識

當前位置 /首頁/綜合知識 > /列表

網頁佈局代碼,佈局設計怎麼寫代碼

1.網頁佈局代碼

7個div就可以 例如:

佈局設計怎麼寫代碼 網頁佈局代碼

<div style="width: 176px;"></div>

<div style="width: 176px;"></div>

<div style="width: 176px;"></div>

<div style="width: 490px;"></div>

<div style="width: 490px;"></div>

<div style="width: 490px;"></div>

<div style="width: 490px;"></div>

2.css div 母版頁佈局的代碼怎麼寫

<html>

<head>

<style>

body{

margin:0px;

padding:0px;

text-align:center;

font-family:"宋體", "新宋體";

background-color:#ffffff;

}

#container{

width:800px;

height:auto;

position:relative;

text-align:left;

margin:0px auto;

padding:0px;

}

#top{

height:50px;

width:800px;

background-color:#090;

}

#middle{

margin-top:10px;

width:800px;

height:auto;

overflow:hidden;

}

#left{

margin:0px 0px 0px 10px;

background-color:#3F0;

width:250px;

float:left;

display:inline;

}

#right{

margin:0px 10px 0px 0px;

background-color:#30F;

width:400px;

float:right;

display:inline;

height:100px;

}

#bottom{

width:780px;

margin:10px 0px 0px 10px;

clear:both;

height:70px;

background-color:#0C0;

}

</style>

</head>

<body>

<div id="container">

<div id="top">

top

</div>

<div id="middle">

<div id="left">

left

</div>

<div id="right">

right

</div>

</div>

<div id="bottom">

bottom

</div>

</div>

<script type="text/javascript">

document.getElementById("right").style.height=document.getElementById("middle").scrollHeight+"px";

document.getElementById("left").style.height=document.getElementById("middle").scrollHeight-0+"px";

</script>

</body>

</html>

right 裏面加內容的話 left會一起拉長 你可以加 br 測試

注意的是 right要固定高度

middle:height:auto;overflow:hidden; 要加上這2個

滿意的話加分謝謝^^

3.電腦排行榜的佈局用安卓怎麼寫代碼

1、把手機屏幕分成上下。上下兩部分都採用Linearlayout方式佈局

2、下半部分LinearLayout高度固定,上半部分LinearyLayout設置layout_weight權重,佔滿剩餘屏幕空間

3、下半部分LinearLayout中添加按鈕,就是把按鈕放到了底部

<LinearLayout>

<LinearLayout

android:layout_height="wrap_content"

android:llayout_weight="1">

//上半部分設置高度自適應,並且權重為1

</LinearyLayout>

<LinearLayout android:layout_height="50px">

<button andtoid:text="底部按鈕"/>

</LinearyLayout>

</LinearLayout>

4.DIV+CSS兩列布局如何寫代碼呢

html xmlns=headmeta ; charset=gb2312 /title兩列固定寬度/titlestyle#left{background-color:#00cc33;border:1px solid #ff3399; width:250px;height:250px;float:left;}#right{background-color:#ffcc33;border:1px solid #ff3399; width:250px;height:250px;float:left;}/style/headbodydiv id=left左列/divdiv id=right右列/div/body/html。

TAG標籤:佈局 網頁 代碼 #