亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

如何用CSS進行網頁布局

江老實 Web前端工程師
難度初級
時長22分
學習人數
綜合評分9.60
1991人評價 查看評價
9.8 內容實用
9.6 簡潔易懂
9.4 邏輯清晰
.top{height:100px;background:#ccc;}
.main{background:red;}
.left{width:200px;background:blue;height:600px;}
.right{position:absolute;left:200px;height:600px;background:pink;margin:0 10px 0;width:100%;}
.foot{height:60px;background:orange;}
RJD
三列布局,兩邊絕對定位,中間設置margin值
先加載left,后加載right涉及到js和jquery了吧?從別處抄了段過來,但還是不懂...
<script type="text/javascript">
function show(){
if($("#right").css("display") == "none") {
$("#right").show();
}
else if($("#left").css("display") == "none") {
$("#left").show();
}

}
.top{background-color:#ccc;height:100px;}
.main{background-color:#f00;height:400px;}
.left{background-color:#00f;width:200px;height:400px;position:absolute;left:0;}
.right{background-color:#e4f;height:400px;width:100%;position:absolute;left:210px;}
.foot{background-color:#fc4;height:100px;}
大家看“恩2”
老是啊怎么了啊 聽著多和藹啊
.top{height:100px;background:grey;}
.main{height:600px;background:red;}
.left{width:200px;height:600px;background:blue;position:absolute;left:0;}
.right{height:600px;background:green;left:210px;right:0;position:absolute;}
.foot{height:100px;background:orange;}
每次聽到那個“啊”就覺得巨娘無比
這樣可以
.top{height:100px;background:#ccc;}
.main{background:red;position:relative;height:500px;}
.left{width:200px;height:500px;background:blue;position:absolute;top:0;}
.right{margin:0 0 50px 210px;background:#9C9;height:500px;}
.foot{height:50px;background:#f63;}
.top{height:100px;background:gray;}
.main{height:400px;width:800px;background:red;margin:0 auto;}
.left{height:400px;width:250px;float:left; background:blue;}
.right{height:400px;width:530px;float:right;background:green;}
.foot{height:100px;width:800px;background:navy;margin:0 auto;clear:both;}
此處需要用到定位,不然做不出來,要么就給MAIN一個寬度
答案給的就不對
前端工程師 是 將技術 視覺 功能等方面結合的一個綜合崗位
有實踐感覺自己進入狀態好多了呢!
先加載left,后加載right涉及到js和jquery了吧?從別處抄了段過來,但還是不懂...
<script type="text/javascript">
function show(){
if($("#right").css("display") == "none") {
$("#right").show();
}
else if($("#left").css("display") == "none") {
$("#left").show();
}

}
setInterval("show()",2000)
課程須知
1.你需要掌握html+css樣式基礎知識 2.有一定的前端實際開發經驗
老師告訴你能學到什么?
1.掌握網頁布局的相關知識 2.能對不同的網頁進行布局結構劃分 3.掌握固定寬度和自適應寬度的實現方法

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消