我想用CSS水平对齐两个图像。在CSS中,我有:在CSS中对齐两个图像
#poster1 {
background-image: url(audioMaster1.png);
background-repeat: no-repeat;
background-position: 0px 40px;
padding-top:595px;
}
#poster2 {
background-image: url(audioMaster2.png);
background-repeat: no-repeat;
background-position: 0px 0px;
padding-top:595px;
}
和HTML,我都不得不时刻:
<div id="poster1"></div>
<div id="poster2"></div>
但是,很明显,这些图像都低于对方,我不想要的。我希望图像并排。
你能多解释一下alex?我不认为你所说的解决了我的问题。我的问题是图像垂直平铺而不是水平平铺。 – AJW
@James检查小提琴...是你想要的吗? – alex
@james你需要给我们关于图像的一些信息,你是什么意思的平铺,因为你有'background-repeat:no-repeat;'btw真棒名字;) –