我不知道我在做什麼錯,但是我的圖像沒有並排顯示在屏幕上?順便說一下,我對CSS很新。理想情況下,我希望圖像像這樣顯示 - bensilvertown.com頁面上的圖像沒有對齊
在此先感謝!
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="work images">
<div>
<a href="http://www.google.com"><img src="/Users/mac/Documents/PICTURES/cursor.png" />
<p>This is image 1</p>
</div>
<div>
<a href="http://www.google.com"><img src="/Users/mac/Documents/PICTURES/MIKE\ BRODIE.jpg" />
<p>This is image 2</p>
</div>
</div>
</body>
</html>
CSS:在div
OBS1內
html{
background-color: #000000
}
html,body{
color: #fff;
font-family:
font-weight:
}
/*align images side by side!*/
div{
float:left;
margin-right:5px;
}
div > img{
height:200px;
width:200px;
}
p{
text-align:center;
}
你''標籤沒有關閉。 – Kangouroops
@Kangouroops謝謝,我做到了,但問題仍然存在。我有一種感覺,它與我在筆記本電腦上保存我的代碼有關。我可以在sbin的實時輸出中看到正確的更改,但我筆記本電腦上的.html不會更新 –