課程
/前端開發
/HTML/CSS
/網頁布局基礎
瀏覽器是火狐的,然而并沒有什么" "用.
2015-08-14
源自:網頁布局基礎 3-2
正在回答
暈,你外聯怎么不在head里添加外聯樣式??? <link? rel="stylesheet" href="index.css" type=“text/css” />
我就想問你、害不害羞,害不害羞。
我用了360,谷歌和IE顯示都是正常的啦。你第一次是用什么瀏覽器??
不過我用的是谷歌瀏覽器
<!DOCTYPE?html> <html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>? <title>清除浮動</title> <style?type="text/css"> #box1{height:?50px;background-color:?red;float:left;} #box2{height:?50px;background-color:?blue;float:right;} p{background:?green?none?repeat?scroll?0; ??color:#fff; ??width:?100%; ??overflow:?hidden;} </style> </head> <body> <div?id="box1">我是盒子1</div> <div?id="box2">我是盒子2</div> <p>我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素</p> </body> </html>
我這樣可以呀~~不知道你的為什么不可以呢
舉報
讓你精通CSS中三大定位機制,徹底掌握網頁布局的相關知識
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2015-12-10
暈,你外聯怎么不在head里添加外聯樣式??? <link? rel="stylesheet" href="index.css" type=“text/css” />
我就想問你、害不害羞,害不害羞。
2015-10-13
我用了360,谷歌和IE顯示都是正常的啦。你第一次是用什么瀏覽器??
2015-08-25
2015-08-25
<!DOCTYPE?html> <html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>? <title>清除浮動</title> <style?type="text/css"> #box1{height:?50px;background-color:?red;float:left;} #box2{height:?50px;background-color:?blue;float:right;} p{background:?green?none?repeat?scroll?0; ??color:#fff; ??width:?100%; ??overflow:?hidden;} </style> </head> <body> <div?id="box1">我是盒子1</div> <div?id="box2">我是盒子2</div> <p>我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素我是P?元素</p> </body> </html>我這樣可以呀~~不知道你的為什么不可以呢