課程
/前端開發
/HTML/CSS
/企業網站綜合布局實戰
hello world!
為什么紅線不出來呢,是不是哪里錯了,求高手指點
2015-05-28
源自:企業網站綜合布局實戰 2-3
正在回答
你看看你的分號有沒有在中文狀態下輸入
盒子距頁面有10px的上邊距---margin-top:10px,盒子中的內容距左側有15px填充---padding-left:15px
<style type="text/css">.myBox{width:200px;height:100px;border:1px solid red;margin-top:10px;padding-left:15px;}</style>
<style type="text/css">
.myBox{
????????width:200px;
????????height:100px;
????????border:1px?solid?red;
????????padding-top:10px;
????????padding-left:15px;
????????}
</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> <!--在此定義一個類選擇器myBox,根據要求設置相關CSS屬性--> <style> ????.myBox{ ????????width:200px; ????????height:100px; ????????border:1px?solid?red; ????????padding-top:10px; ????????padding-left:15px; ????????} </style> </head> <body> <div?class="myBox">Hello?World!</div> <!--在此添加一個div標簽,并設置其class屬性為myBox--> </body> </html>
舉報
本課程重點介紹HTML/CSS實現常見企業網站布局的方法
2 回答盒子模型的概念
1 回答盒子模型中的(左)填充是啥?
5 回答盒子寬度和高度問題
1 回答盒子的寬度和高度
2 回答請問news course sidebar 三個盒子高度為什么不一致,course盒子低了一點
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-08-20
你看看你的分號有沒有在中文狀態下輸入
2015-05-31
盒子距頁面有10px的上邊距---margin-top:10px,盒子中的內容距左側有15px填充---padding-left:15px
2015-05-31
<style type="text/css">
.myBox{
width:200px;
height:100px;
border:1px solid red;
margin-top:10px;
padding-left:15px;
}
</style>
2015-05-29
<style type="text/css">
.myBox{
????????width:200px;
????????height:100px;
????????border:1px?solid?red;
????????padding-top:10px;
????????padding-left:15px;
????????}
</style>
2015-05-28