關于顯示問題,圖片和文字不在一行???而且文字的邊框不顯示,背景也不顯示
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.demo01{width:600px;position: relative;}
.demo01.left{width: 100px;float: left;}
.demo01.left img{margin-left: 20px}
.demo01.right{width: 308px;padding:10px;float: right;background: #9CF;border: 1px solid #ccc}
.demo span{position: absolute;right: 20px;top: 10px}
</style>
</head>
<body>
</body>
<div>
<div>
<img src="想你---尹恩惠.jpg" width="90px" height="120px" />
</div>
<div>
<h6>櫻桃小丸子</h6>
<p>本王是對方考慮撒酒瘋山東高考撒大家給零售商的法律大上激發了肯德基方臘時打開飛水淀粉及案例會計分錄卡薩丁飛機上課的房間辣所肩負的殺掉了開發是大家愛瘋了快放假ADSL發生的開發傻大姐方式打開就發了福建省的離開 </p>
<span>10分鐘前</span>
</div>
</div>
</html>?
2016-04-21
你這個首先內容應該放在body里面,檢查一下body標簽。
其次,你的樣式是加給誰的? html標簽里連class或者id屬性都沒有加,怎么給他們樣式?
建議您先把基礎知識掌握好
2016-04-21
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
?? ?.demo01{width:600px;position: relative;}
?? ?.demo01 .left{width: 100px;float: left;}
?? ?.left img{margin-left: 100px}
?? ?.right{width: 308px;padding:10px;float: right;background: #9CF;border: 1px dotted #ccc}
?? ?.demo01 span{position: absolute;right: 20px; top: 10px}
</style>
</head>
<body>
?? ?<div class="demo01">
?? ??? ?<div class="left">
?? ??? ??? ?<img src="file:///C:/Users/liuyongjie/Desktop/小新.jpeg" width="90px" height="90px" />
?? ??? ?</div>
?? ??? ?<div class="right">
?? ??? ??? ?<h6>櫻桃小丸子</h6>
?? ??? ??? ??? ?<p>
?? ??? ??? ??? ??? ?本王是對方考慮撒酒瘋山東高考撒大家給零售商的法律大上激發了肯德基方臘時打開飛水淀粉及案例會計分錄卡薩丁飛機上課的房間辣所肩負的殺掉了開發是大家愛瘋了快放假ADSL發生的開發傻大姐方式打開就發了福建省的離開
?? ??? ??? ??? ?</p>
?? ??? ?<span>10分鐘前</span>
?? ??? ?</div>
?? ?</div>
</body>
</html>