我有一个我想要移动的图像列表,但它不起作用.
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
</head>
<body>
<div id="wrapper">
<h1>Portfolio</h1>
<img src="assets/img/PHOTOGRAOHY.png" alt="Photography" width="214" height="183">
<img id="industrialDesignIMG" src="assets/img/ID.png" alt="Industrial Design" width="232" height="183">
<img src="assets/img/GraphicDesign.png" alt="Graphic Design" width="233" height="196">
<img src="assets/img/animation.png" alt="Animation" width="198" height="142">
</div>
</body>
</html>
?
Run Code Online (Sandbox Code Playgroud)
CSS:
#industrialDesignIMG {
border:1px #fff solid;
display: inline-block;
margin-top: 80px;
}
#wrapper {
width:960px;
margin:0 auto;
}
Run Code Online (Sandbox Code Playgroud)
我想#industrialDesignIMG
有一个margin-top
的80px
,但无论是什么动作或所有img
元素移动.我该怎么做才能让我的margin-top
工作?