所以我一直在研究一个文本和图像的页面。但是,我找不到在文本之间放置图像的方法。要么停留在左上角,要么只是水平居中。这里是重要的代码:如何对齐文字之间的图像?
<style>
body {
margin: 0;
background-image: url("rainbowbg.png");
}
div #hype {
margin-left: auto;
margin-right: auto;
display: block;
positon: relative;
}
#hypetop {
position: fixed;
top: 0;
width: 100%;
}
#hypebot {
position: fixed;
bottom: 0;
width: 100%;
}
.hypetext {
font-family: Impact, Charcoal, sans-serif;
font-size: 64px;
text-align: center;
}
</style>
<body>
<div>
<h1 class="hypetext" id="hypetop">DIRE</h1>
<img id="hype" src="DIREHYPE.png" width="224" height="224">
<h1 class="hypetext" id="hypebot">HYPPPPPPPPPPPE</h1>
</div>
</body>
如果有人知道我如何能够在文本之间获得图像集中,这将是伟大的。
谢谢。这对我来说非常合适。 – 2014-09-06 18:19:13
欢迎亲爱的。 – Developer 2014-09-06 18:19:47