課程
/前端開發
/HTML/CSS
/網頁布局基礎
怎么看不到效果啊
2015-11-09
源自:網頁布局基礎 4-2
正在回答
看到少了個style的結束標簽,</style>
少個</style>吧
說明還是哪兒有點小毛病吧,下面是完整的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>無標題文檔</title><style type="text/css">.box1{ background-color:red; height:300px; position:relative; top:50px; left:30px;}.box2{ background-color:green; height:100px;}.box3{ background-color:blue; height:200px;}</style></head><body><div class="box1">box1</div><div class="box2">box2</div><div class="box3">box3</div></body></html>??
qq_淺夏淡憶_0 提問者
<style>.box1{ background-color:red; height:300px; position:relative;top:50px; left:30px;}.box2{ background-color:green; height:100px;}.box3{ background-color:blue; height:200px;}</style></head>
<body><div class="box1">box1</div><div class="box2">box2</div><div class="box3">box3</div></body>
?? 把你的抄了一遍,有效果??!
慕碼人0911192 回復 qq_淺夏淡憶_0 提問者
qq_淺夏淡憶_0 提問者 回復 慕碼人0911192
舉報
讓你精通CSS中三大定位機制,徹底掌握網頁布局的相關知識
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-05-06
看到少了個style的結束標簽,</style>
2016-04-05
少個</style>吧
2015-11-14
說明還是哪兒有點小毛病吧,下面是完整的
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/css">
.box1{ background-color:red; height:300px; position:relative; top:50px; left:30px;}
.box2{ background-color:green; height:100px;}
.box3{ background-color:blue; height:200px;}
</style>
</head>
<body>
<div class="box1">box1</div>
<div class="box2">box2</div>
<div class="box3">box3</div>
</body>
</html>
??
2015-11-11
<style>
.box1{ background-color:red; height:300px; position:relative;top:50px; left:30px;}
.box2{ background-color:green; height:100px;}
.box3{ background-color:blue; height:200px;}
</style>
</head>
<body>
<div class="box1">box1</div>
<div class="box2">box2</div>
<div class="box3">box3</div>
</body>
?? 把你的抄了一遍,有效果??!