我的代码
.header {
background-color: #694e4e;
height: 95px;
max-width: 100%;
max-height: 100%;
}
h1 {
font-size: 300%;
position: relative;
color: white;
text-align: right;
font-family: Verdana, Courier, monospace;
margin-top: 0px;
padding-top: 10px;
margin-right: 24px;
}
body {
margin: 0;
}
.douag {
margin: auto;
}
<div class="header">
<h1>hhhh </h1>
<img src="ss.png" class="douag" />
</div>
问题是ss.png位于页面顶部的标题之外。我想要它。
答案 0 :(得分:0)
下面你可以看到图像出现。
.header {
background-color: #694e4e;
height: 95px;
max-width: 100%;
max-height: 100%;
}
h1 {
font-size: 300%;
position: relative;
color: white;
text-align: right;
font-family: Verdana, Courier, monospace;
margin-top: 0px;
padding-top: 10px;
margin-right: 24px;
}
body {
margin: 0;
}
.douag {
margin: auto;
}
<div class="header">
<h1>hhhh </h1>
<img src="https://bitcoin.org/img/icons/opengraph.png" class="douag" />
</div>
答案 1 :(得分:0)