0

I've looked for a solution for this but can't find nothing, Basically, what I've done is used the html map tag and used an image of a gameboy advance for the image, I've done all the areas so that it seems as if the buttons are clickable, what I want to know is if there is an easy way to get the images I want in the slideshow in the centre of the gameboy screen? For a clearer view on what I mean, this is what it is.. http://retrogamez.webege.com/

Any help will be greatly appreciated! thanks

4

2 回答 2

3

您没有使用绝对正确的位置。您的图像的父级需要一个位置,否则他将使用屏幕尺寸作为基础。

#maincontent{
    position: relative;
}
#maincontent > .img-game{
    position: absolute;
    top: 10px; /* just a example I dont know the right value */
    left: 50%; /* just a example I dont know the right value */
}
于 2013-05-15T15:59:46.073 回答
1

您可以尝试使用position:relative. 然后在div标签所在的img标签内居中;这样,无论屏幕大小如何,图像都将始终位于 div 的中心。

于 2013-05-15T16:00:49.563 回答